/* Keep complete weapon comparisons inside their cards on tablets and split view. */
#arsenal .inventory-grid,
#arsenal .inventory-weapon {
  touch-action: pan-y;
}
.touch-controls #arsenal .arsenal-dialog {
  height: min(920px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
}
.touch-controls #arsenal .inventory-grid {
  align-content: stretch;
  gap: 14px;
}
.touch-controls #arsenal .inventory-grid[data-rows='1'] {
  align-items: center;
}
.touch-controls #arsenal .inventory-weapon {
  padding: 14px;
  max-height: 340px;
  overflow: hidden;
  justify-content: flex-start;
  -webkit-user-select: none;
  user-select: none;
}
.touch-controls #arsenal .weapon-heading {
  min-height: 46px;
  padding-right: 68px;
  flex-shrink: 0;
}
.touch-controls #arsenal .weapon-heading b {
  font-size: 22px;
  line-height: 1.12;
}
.touch-controls #arsenal .weapon-heading small {
  font-size: 12px;
  line-height: 1.35;
}
.touch-controls #arsenal .inventory-weapon p {
  font-size: 14px;
  line-height: 1.4;
  min-height: 2.8em;
  margin: 10px 0 12px;
  flex-shrink: 0;
}
.touch-controls #arsenal .weapon-stats {
  margin-top: auto;
  gap: 3px;
  flex-shrink: 0;
}
.touch-controls #arsenal .weapon-stat-row {
  grid-template-columns: 94px minmax(32px, 1fr) 78px;
  min-height: 23px;
  gap: 7px;
}
.touch-controls #arsenal .weapon-stat-row small {
  font-size: 13px;
}
.touch-controls #arsenal .weapon-stat-row b {
  font-size: 15px;
}
.touch-controls #arsenal .stat-track {
  height: 9px;
}
.touch-controls #arsenal .equip-state {
  font-size: 13px;
  margin-top: 12px;
  padding-top: 10px;
  flex-shrink: 0;
}
.touch-controls #arsenal .page-controls {
  min-height: 48px;
  gap: 16px;
  margin-top: 14px;
  font-size: 15px;
  flex-shrink: 0;
}
.touch-controls #arsenal .page-controls button {
  min-height: 48px;
  min-width: 118px;
}
.touch-controls #arsenal .arsenal-footer {
  gap: 12px;
  min-height: 30px;
  margin-top: 12px;
  align-items: center;
}
.touch-controls #arsenal .arsenal-footer > span:last-child {
  font-size: 12px;
  line-height: 1.35;
  max-width: 330px;
}
@media (max-width: 1099px) {
  .touch-controls #arsenal .weapon-stat-row {
    grid-template-columns: 90px minmax(24px, 1fr) 74px;
    gap: 5px;
  }
  .touch-controls #arsenal .inventory-weapon {
    padding: 12px;
  }
  .touch-controls #arsenal .weapon-heading b {
    font-size: 21px;
  }
}
@media (max-height: 700px) {
  .touch-controls #arsenal .arsenal-dialog {
    padding: 16px 20px;
    height: calc(100dvh - 24px);
  }
  .touch-controls #arsenal .arsenal-heading {
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  .touch-controls #arsenal .inventory-weapon {
    padding: 10px 12px;
    max-height: none;
  }
  .touch-controls #arsenal .inventory-weapon p {
    font-size: 13px;
    line-height: 1.35;
    margin: 4px 0 6px;
    min-height: 2.7em;
  }
  .touch-controls #arsenal .weapon-heading {
    min-height: 42px;
  }
  .touch-controls #arsenal .weapon-stat-row {
    min-height: 21px;
  }
  .touch-controls #arsenal .weapon-stats {
    gap: 1px;
  }
  .touch-controls #arsenal .equip-state {
    margin-top: 6px;
    padding-top: 5px;
  }
  .touch-controls #arsenal .arsenal-footer > span:last-child {
    display: none;
  }
  .touch-controls #arsenal .arsenal-footer {
    min-height: 18px;
    margin-top: 6px;
  }
  .touch-controls #arsenal .page-controls {
    margin-top: 10px;
  }
}
@media (max-width: 650px) {
  .touch-controls #arsenal .arsenal-footer > span:last-child {
    display: none;
  }
  .touch-controls #arsenal .page-controls {
    gap: 8px;
  }
  .touch-controls #arsenal .page-controls button {
    min-width: 96px;
    padding: 10px 12px;
  }
  .touch-controls #arsenal .arsenal-heading h2 {
    font-size: 20px;
  }
}
@media (max-height: 540px) {
  .touch-controls #arsenal .inventory-weapon p {
    display: none;
  }
  .touch-controls #arsenal .weapon-stats {
    margin-top: 8px;
  }
  .touch-controls #arsenal .arsenal-heading p {
    display: none;
  }
  .touch-controls #arsenal .arsenal-heading h2 {
    margin-bottom: 0;
  }
  .touch-controls #arsenal .arsenal-footer {
    font-size: 12px;
  }
  .touch-controls #arsenal .page-controls {
    margin-top: 8px;
  }
}
