/* Legacy tent pixels: stick-war-legacy.ru/hero/gaidy/prokachka.webp.
   Flash background: bitmap 2449 in farm.stickpage.com/stickwar_08.swf. */
.armory-dialog {
  width: min(1060px, 97vw);
  max-height: 94dvh;
  padding: 0 16px 14px;
  border: 3px solid #563519;
  border-radius: 6px;
  background:
    url("armory-legacy-tent.webp") 44% 35% / min(34%, 330px) auto no-repeat,
    radial-gradient(110% 54% at 50% 100%, #2fdd08 99%, transparent 100%),
    radial-gradient(116% 65% at 40% 100%, #139643 99%, transparent 100%),
    linear-gradient(#80b0e1, #6a9bd3);
  color: #fff3d3;
}
.armory-dialog[data-style="classic1"] {
  background:
    repeating-linear-gradient(2deg, transparent 0 9px, #59371c15 10px 11px, transparent 12px 17px),
    repeating-linear-gradient(0deg, #654120 0px, #a7753f 4px, #bd9055 8px, #9a6c35 81px, #573715 85px);
}
.armory-dialog[data-style="legacy2"] {
  border-color: #222730;
  background:
    url("armory-legacy-tent.webp") 42% 19% / min(37%, 240px) auto no-repeat,
    url("armory-legacy-native-tent.webp") 17% 47% / min(12%, 115px) auto no-repeat,
    url("armory-legacy-native-tent.webp") 56% 39% / min(17%, 165px) auto no-repeat,
    radial-gradient(120% 54% at 50% 102%, #0bce00 99%, transparent 100%),
    url("armory-legacy-native-hill.webp") center bottom / 100% 72% no-repeat,
    linear-gradient(#79abe0 6%, #9ac9ed 58%, #66bd28 59%);
}
.armory-dialog header {
  z-index: 2;
  background: none;
  padding: 9px 0;
}
.armory-dialog header > *, .armory-inspect {
  border: 3px ridge #c08c42;
  background: linear-gradient(#ac7330, #674014);
  box-shadow: 0 2px 3px #2e190a80;
  border-radius: 4px;
  padding: 6px 12px;
}
.armory-dialog h2 { font: 900 clamp(17px, 4vw, 32px) Georgia, serif; text-shadow: 1px 2px #36220d; }
.armory-dialog #armoryReady { background: linear-gradient(#d7442b,#822215); color: #fff6d7; font-weight: 800; }
.armory-dialog[data-style="legacy2"] h2 {
  border: 0;
  width: clamp(110px, 25vw, 240px);
  aspect-ratio: 4 / 1;
  padding: 0;
  font-size: 0;
  background: url("armory-legacy-native-title.webp") center / 100% 100% no-repeat;
  box-shadow: none;
}
.armory-dialog[data-style="legacy2"] #armoryReady {
  min-height: 38px;
  border: 0;
  padding-inline: 16px;
  background: #a6251a url("armory-legacy-native-ready.webp") center / 100% 100% no-repeat;
  text-shadow: 1px 1px #4b1b0b;
}
.armory-dialog[data-style="legacy2"] .armory-inspect,
.armory-dialog[data-style="legacy2"] #armoryPoints {
  border-color: #7a4f22;
  background: linear-gradient(#21130865,#21130880), #75471d url("armory-legacy-native-wood.webp") center / cover;
}
.armory-upper { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px; }
.armory-inspect { min-height: 112px; background: #473010f2; }
.armory-inspect p { margin: 6px 0 10px; }
.armory-inspect small { color: #e6cda1; }
.armory-base { justify-self: start; width: min(240px,100%); }
.armory-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 8px;
  margin-top: 4px;
}
.armory-station { min-width: 0; text-align: center; }
.armory-station canvas { display: block; width: 100%; height: auto; aspect-ratio: 160 / 150; }
.armory-dialog[data-style="legacy2"][open] {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 6fr);
  gap: 8px 12px;
}
.armory-dialog[data-style="legacy2"] header { grid-column: 1 / -1; }
.armory-dialog[data-style="legacy2"] .armory-upper { display: contents; }
.armory-dialog[data-style="legacy2"] .armory-inspect {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  width: min(100%, 490px);
}
.armory-dialog[data-style="legacy2"] .armory-base {
  grid-column: 1;
  grid-row: 3;
  width: 100%;
  transform: translateY(-10px);
}
.armory-dialog[data-style="legacy2"] .armory-grid {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
}
.armory-station h3 {
  display: inline-block;
  margin: 0 0 4px;
  padding: 2px 8px;
  background: #332310ed;
  border: 1px solid #bf9357;
  border-radius: 3px;
  font-size: 13px;
}
.armory-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.armory-slot { display: grid; justify-items: center; gap: 3px; }
.armory-dialog .armory-item {
  width: 38px;
  height: 38px;
  padding: 4px;
  border: 2px solid #d6b453;
  border-radius: 6px;
  color: #ffefbd;
  background: linear-gradient(#453415,#241b0b);
}
.armory-item[aria-pressed="true"] { outline: 2px solid #a8eaff; outline-offset: 1px; }
.armory-item svg { width: 100%; height: 100%; }
.armory-legacy-icon {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("armory-legacy-native-icons.webp");
  background-size: 1300% 100%;
  background-repeat: no-repeat;
}
.armory-dialog .armory-buy {
  min-width: 32px;
  padding: 1px 3px;
  font-size: 11px;
  font-weight: 800;
  background: #236128;
}
.armory-dialog[data-style="classic1"] .armory-item { border-color: #8fddd5; background: #485675; border-radius: 1px; }
.armory-dialog[data-style="legacy2"] .armory-item {
  border-color: #ebc64d;
  background: linear-gradient(#3fbdff,#0745d7);
}
.armory-dialog[data-style="classic1"] .armory-buy { background: #8d2318; }
.armory-dialog .armory-buy:disabled { background: #302b25; }
.armory-dialog[data-style="legacy2"] .armory-buy:not(:disabled) {
  border-color: transparent;
  background: #276924 url("armory-legacy-native-upgrade.webp") center / 100% 100% no-repeat;
  text-shadow: 1px 1px #1b3713;
}
@media (max-width: 700px) {
  .armory-dialog { padding-inline: 8px; }
  .armory-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .armory-station canvas { max-height: 125px; object-fit: contain; }
  .armory-upper { gap: 6px; }
  .armory-inspect { padding: 6px; font-size: 13px; }
  .armory-dialog[data-style="legacy2"][open] {
    grid-template-columns: minmax(68px, 1fr) minmax(0, 3fr);
    column-gap: 6px;
  }
  .armory-dialog[data-style="legacy2"] #armoryReady,
  .armory-dialog[data-style="legacy2"] #armoryPoints {
    padding-inline: 8px;
    font-size: 13px;
    white-space: nowrap;
  }
}
@media (min-width: 761px) {
  .armory-dialog[data-style="classic1"] {
    width: min(1060px, 96vw, 138dvh);
    aspect-ratio: 1204 / 800;
    background: #927042 url("armory-flash-original.jpg") center / 100% 100% no-repeat;
    padding: 0;
    overflow: hidden;
    container-type: inline-size;
  }
  .armory-dialog[data-style="classic1"] header { position: static; }
  .armory-dialog[data-style="classic1"] h2 {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    padding: 0;
  }
  .armory-dialog[data-style="classic1"] #armoryPoints {
    position: absolute; top: 4.2%; left: 66%; padding: 2px 5px;
    background: #472e1acc; border: 0; font-size: clamp(10px, 1.5cqw, 15px);
  }
  .armory-dialog[data-style="classic1"] #armoryReady {
    position: absolute; top: 4.2%; right: 8%; font-size: clamp(11px, 1.6cqw, 17px);
  }
  .armory-dialog[data-style="classic1"] .armory-upper { display: contents; }
  .armory-dialog[data-style="classic1"] .armory-inspect {
    position: absolute; top: 16%; left: 46%; right: 8%; min-height: 0;
    background: none; border: 0; box-shadow: none;
    color: #fff3d3; text-shadow: 1px 1px #50301a; font-size: clamp(12px, 1.7cqw, 17px);
  }
  .armory-dialog[data-style="classic1"] .armory-base { position: absolute; left: 1%; top: 29%; width: 23%; }
  .armory-dialog[data-style="classic1"] .armory-base canvas { width: 74%; margin: auto; }
  .armory-dialog[data-style="classic1"] .armory-grid {
    position: absolute; inset: auto 2% 1% 2%; margin: 0; gap: 0;
    grid-template-columns: repeat(5,minmax(0, 1fr)) minmax(0, 1.65fr);
  }
  .armory-dialog[data-style="classic1"] .armory-grid canvas { height: 13cqw; object-fit: contain; transform: translateY(1.5cqw); }
  .armory-dialog[data-style="classic1"] .armory-item { width: clamp(24px,3.5cqw,38px); height: clamp(24px,3.5cqw,38px); }
}
