.modal-panel[data-kind="items"] {
  width: min(520px, calc(100% - 18px));
  border: 1px solid #bed5e8;
  border-radius: 16px;
  background: #fcfdff;
  color: #183d57;
  box-shadow: 0 12px 40px #152c2f66;
}
.modal-panel[data-kind="items"] .modal-close {
  width: 39px;
  height: 39px;
  color: #315b79;
  border-radius: 50%;
  border-color: #c6dbed;
  background: #e7f2fc;
}
.item-profile { display: grid; gap: 8px; min-width: 0; padding: 3px 2px }
.item-profile-heading { display: flex; align-items: center; gap: 9px; min-height: 49px; padding-inline-end: 43px }
.item-profile-identity { min-width: 0 }
.item-profile-identity h2 { color: #183d57; font-size: clamp(19px,4.1vw,25px); line-height: 1.22; overflow-wrap: anywhere }
.item-profile-icon { flex: none; display: grid; place-items: center; width: 49px; height: 49px; border: 1px solid #9bc0df; border-radius: 11px; background: #eef6fd }
.item-profile-icon .icon { background-color: transparent }
.item-profile-category { color: #526f83; font-size: 12px }
.item-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 5px 12px;
  margin: 0;
  padding: 9px;
  border: 1px solid #d4e4f2;
  border-radius: 10px;
  background: #e8f2fb;
}
.item-profile-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; min-width: 0; font-size: 13px; line-height: 1.4 }
.item-profile-stat dt { color: #4c697f; overflow-wrap: anywhere }
.item-profile-stat dd { margin: 0; color: #1f4665; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap }
.item-profile-section { display: flex; align-items: center; gap: 7px; color: #526e85; font-size: 13px }
.item-profile-section::after { flex: 1; border-top: 1px solid #dce7f1; content: "" }
.item-profile-option { color: #79598a }
.item-profile-option::after { border-color: #e5d9e9 }
.item-profile-reqs { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0 }
.item-profile-reqs li { padding: 2px 7px; border-radius: 10px; background: #e4f0fb; color: #315e82; font-size: 12px }
.item-profile-description { color: #405569; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere }
.item-profile-effect { color: #5e4375; font-size: 13px }
.item-profile-max summary { width: fit-content; min-height: 38px; padding: 7px; color: #704f81; font-size: 13px; font-weight: 700; cursor: pointer }
.item-profile-max .item-profile-stats { background: #f5effa; border-color: #e6dcec }
.item-profile-prices { display: grid; gap: 4px; margin: 0; padding-top: 7px; border-top: 1px dashed #d5e3f0 }
.item-profile-upgrade { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; color: #aa388e; font-weight: 700 }
.item-upgrade-price { overflow-wrap: anywhere }
.item-upgrade-price small { display: block; color: #6e5774; font-size: 11px; font-weight: 400 }
.item-upgrade-link { padding: 5px 11px; border: 1px solid #d1b596; border-radius: 7px; background: linear-gradient(#fff6e6,#ecddc2); color: #705137; font-size: 13px; text-decoration: none }
.item-upgrade-link:hover { background: #ffeac5 }
.modal-panel[data-kind="items"] .related-list { grid-template-columns: minmax(0,1fr) }

@media (max-width: 370px) {
  .item-profile-stats { padding: 7px; column-gap: 8px }
  .item-profile-stat { font-size: 12px }
}
