/* Weapons occupy a real inspection row; only Save commits the draft. */
#garage .equipment-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: calc(100dvh - 220px);
}
.equipment-scroll {
  flex: 1;
  min-height: 0;
  padding: 14px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #70818a #17232d;
}
.equipment-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 10px 16px 12px;
  background: linear-gradient(#223642, #101e2a);
  border-top: 1px solid #5d7583;
  box-shadow: 0 -6px 16px #07131d77;
}
#garage .equipment-actions #save {
  position: relative;
  margin: 0;
  min-height: 48px;
  box-shadow: none;
}
#garage .equipment-actions .changes {
  font-size: 11px;
  padding: 0;
  margin: 0;
  color: #eac77e;
}
#garage .equipment-actions #equipment-traits {
  min-height: 34px;
  margin: 0;
  padding: 5px 10px;
  font-size: 12px;
}
#garage .equipment-actions .text-action {
  padding: 2px;
  margin: 0;
  min-height: 30px;
  font-size: 12px;
}
#garage #garage-progress {
  margin: 8px 0;
  padding: 8px 10px;
}
#garage #build-presets summary {
  padding: 9px 10px;
  font-size: 13px;
}
#garage #build-description[hidden] {
  display: none;
}
#garage .equipment-panel h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 20px;
  margin: 16px 0 10px;
}
#garage #capacity {
  font-size: 15px;
  color: #f3c86b;
  font-variant-numeric: tabular-nums;
}
#garage #slots .slot {
  display: block;
  margin: 10px 0;
  padding: 0 0 8px;
  border: 1px solid #4d6270;
  background: linear-gradient(125deg, #223541e8, #101b26f2);
  border-radius: 5px;
  overflow: hidden;
}
#garage .equipment-tile {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #edf3ee;
  min-height: 88px;
  border-bottom: 1px solid #3c5261;
}
#garage .equipment-tile:hover {
  background: #314b5b;
}
#garage .equipment-tile:focus-visible {
  outline: 3px solid #ffd16a;
  outline-offset: -3px;
}
.equipment-art {
  display: grid;
  place-items: center;
  flex: 0 0 76px;
  height: 72px;
  border: 1px solid #466170;
  border-radius: 3px;
  background: radial-gradient(
    ellipse at 50% 80%,
    #4c6577 0,
    #182b3a 62%,
    #101c29
  );
  box-shadow: inset 0 -3px #0c1720;
}
.equipment-art img {
  width: 76px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 3px #0009);
}
.equipment-art.empty {
  font-size: 32px;
  font-weight: 300;
  color: #7793a4;
  background:
    repeating-linear-gradient(135deg, #263c4933 0 6px, transparent 6px 12px),
    #13232e;
  border-style: dashed;
}
.equipment-identity {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.equipment-identity small {
  color: #9bb2bf;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.equipment-identity strong {
  font-size: 18px;
  line-height: 1.25;
  color: #fff3d2;
}
.equipment-identity > span {
  font-size: 11px;
  line-height: 1.35;
  color: #b0c5cc;
}
.equipment-arrow {
  font-size: 28px;
  color: #e8bf65;
}
#garage #slots .slot > small {
  display: block;
  padding: 0 12px;
  margin: 7px 0 0;
  line-height: 1.5;
  font-size: 11px;
  color: #c0cdd0;
}
#garage #slots .weapon-mastery {
  color: #d9bc7a;
}
#equipment-picker {
  padding: 0;
  width: min(720px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  color: #e9f2f2;
  background: linear-gradient(145deg, #203240, #101c27 65%);
  border: 2px solid #8295a0;
  border-top: 3px solid #efbd59;
  border-radius: 9px;
  box-shadow:
    0 24px 80px #000b,
    inset 0 1px #dae6e933;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #718a98 #15222d;
}
#equipment-picker::backdrop {
  background: #050c16c9;
  backdrop-filter: blur(6px);
}
#equipment-picker header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #5a7280;
  background: linear-gradient(#2d4250, #1c2c38);
  position: sticky;
  top: 0;
  z-index: 2;
}
#equipment-picker h2 {
  margin: 0 0 6px;
  font-size: 24px;
  color: #fff1cb;
}
#equipment-picker header p {
  margin: 0;
  font-size: 13px;
  color: #a9c0cc;
}
#equipment-picker .picker-close {
  min-height: 44px;
  min-width: 64px;
  border: 1px solid #76919f;
  border-radius: 4px;
  background: #172935;
  color: #eaf2f4;
  font-size: 14px;
}
.picker-hardpoint {
  margin: 14px 20px 0;
  padding: 10px 12px;
  border-left: 3px solid #e7b957;
  background: #57452044;
  color: #eed296;
  font-size: 13px;
  line-height: 1.5;
}
.equipment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 20px 22px;
}
#equipment-picker .equipment-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  min-width: 0;
  padding: 10px 12px 12px;
  color: #e7eef0;
  border: 1px solid #607a89;
  border-radius: 5px;
  background: linear-gradient(145deg, #304754, #172733);
  box-shadow:
    inset 0 1px #a4bfcc33,
    0 3px #08131c;
}
.equipment-option img,
.equipment-option .remove-equipment {
  width: 100%;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 5px 3px #0007);
}
.remove-equipment {
  display: grid;
  place-items: center;
  font-size: 40px;
  color: #7e9aa8;
}
.equipment-option strong {
  margin: 7px 0;
  font-size: 16px;
}
.equipment-option small {
  font-size: 11px;
  line-height: 1.5;
  color: #a8c0ca;
  font-variant-numeric: tabular-nums;
}
.equipment-option .equipment-condition {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #60778466;
  color: #c1d4d6;
  font-size: 12px;
}
#equipment-picker .equipment-option[aria-pressed="true"] {
  border: 2px solid #ffc24d;
  padding: 9px 11px 11px;
  background: linear-gradient(145deg, #695023, #202c32);
}
.equipment-option[aria-pressed="true"] .equipment-condition {
  color: #ffcf6b;
}
#equipment-picker .equipment-option:disabled {
  opacity: 1;
  border-color: #425260;
  background: #17252f;
  color: #8fa5b0;
  box-shadow: none;
}
.equipment-option:disabled img {
  filter: saturate(0.75) brightness(0.75);
}
.equipment-option:disabled .equipment-condition {
  color: #acafb0;
}
#equipment-picker .equipment-option:enabled:hover {
  border-color: #ffce75;
  background: #3d4f55;
}
#equipment-picker button:focus-visible {
  outline: 3px solid #ffe4a6;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  #garage .equipment-panel {
    height: auto;
    max-height: none;
  }
  .equipment-scroll {
    flex: 0 0 auto;
    overflow: visible;
  }
  #equipment-picker header {
    padding: 14px;
  }
  #equipment-picker h2 {
    font-size: 21px;
  }
  .equipment-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
    gap: 8px;
  }
  .picker-hardpoint {
    margin: 12px 14px 0;
    font-size: 12px;
  }
  .equipment-option img,
  .equipment-option .remove-equipment {
    height: 88px;
  }
  #equipment-picker .equipment-option {
    padding: 9px;
  }
  #equipment-picker .equipment-option[aria-pressed="true"] {
    padding: 8px;
  }
}
@media (max-height: 500px) and (min-width: 601px) {
  #garage .equipment-panel {
    top: 164px;
    height: calc(100dvh - 180px);
    max-height: calc(100dvh - 180px);
  }
  #garage #garage-preview-space {
    display: block;
    position: absolute;
    top: 164px;
    bottom: 18px;
    left: 46%;
    right: 18px;
    height: auto;
    margin: 0;
  }
  #garage .equipped-label {
    display: none;
  }
  #garage .equipment-actions {
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    padding: 6px 12px;
  }
  #garage .equipment-actions .changes,
  #garage .equipment-actions .text-action {
    grid-column: 1/-1;
  }
  #garage .equipment-actions #save {
    min-height: 44px;
  }
  #equipment-picker {
    max-height: calc(100dvh - 16px);
  }
  #equipment-picker header {
    padding: 10px 16px;
  }
  .equipment-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 12px 16px;
  }
  .equipment-option img,
  .equipment-option .remove-equipment {
    height: 64px;
  }
}
