#shop-dialog {
  width: min(750px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  max-height: calc(100svh - 28px);
  padding: clamp(14px, 3vw, 27px);
  border-color: #8c5e95;
  background: radial-gradient(ellipse at 95% 0%, #3b2447, transparent 50%), #181221;
  box-shadow: 0 20px 80px #07050ce8;
  overscroll-behavior: contain;
}
#shop-dialog::backdrop { background: #090713d9; backdrop-filter: blur(5px); }
.shop-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: clamp(6px, 1.6vw, 12px);
  margin-bottom: clamp(12px, 2.5vw, 20px);
}
.shop-head h2 {
  font-size: clamp(20px, 4.8vw, 34px);
  letter-spacing: -.045em;
  line-height: 1.1;
  font-weight: 950;
}
.shop-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 35px;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 4px;
  border: 1px solid #6d5664;
  background: #251b2d;
  color: #e2c9d4;
  font-size: 13px;
}
.shop-wallet-value {
  font: 850 1rem/1 ui-monospace, monospace;
  color: #ffc786;
}
.shop-coin {
  width: .69rem;
  height: .69rem;
  flex: 0 0 .69rem;
  transform: rotate(45deg);
  background: #a85953;
  border: 1px solid #ffcc94;
  box-shadow: inset 0 0 0 2px #2a1b2c, 0 0 10px #ffb17742;
}
.shop-close {
  min-width: 37px;
  min-height: 37px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}
.shop-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.shop-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #594262;
  border-radius: 5px;
  background: #241a30;
}
.shop-item--equipped { border-color: var(--shop-item-color); }
.shop-item--fighter {
  grid-column: 1 / -1;
  grid-template-columns: clamp(76px, 19vw, 154px) minmax(0,1fr) auto;
  gap: clamp(9px, 3vw, 20px);
  min-height: 139px;
  padding: 0 15px 0 0;
  border-color: #9275ca;
  background: radial-gradient(ellipse at 0 15%, #4c3a75, transparent 66%), #271e39;
}
.shop-item-art { position: relative; overflow: hidden; isolation: isolate; }
.shop-item--fighter .shop-item-art {
  align-self: stretch;
  min-height: 135px;
  border-radius: 4px 0 0 4px;
  background: radial-gradient(ellipse at 50% 50%, #d6c6ff50, #44396c05 75%);
}
.shop-item--fighter .shop-item-art::before {
  position: absolute;
  content: "";
  width: 73%;
  aspect-ratio: 1;
  left: 11%;
  top: 12%;
  border: 1px solid #d0c2ffaa;
  border-radius: 50%;
  box-shadow: 0 0 24px #ac90ff70;
  transform: rotate(-18deg) scaleY(.69);
}
.shop-item--fighter .shop-item-art img {
  display: block;
  position: absolute;
  width: 106%;
  height: 180%;
  inset: 11% auto auto 2%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 2px 9px #13071b);
}
.shop-item--aura .shop-item-art {
  width: 63px;
  height: 58px;
  background: radial-gradient(ellipse at 50% 53%, color-mix(in srgb, var(--shop-item-color) 25%, #191223), #171021 73%);
  border: 1px solid #624e6b;
  border-radius: 4px;
}
.shop-halo,
.shop-halo::before,
.shop-halo::after {
  border-radius: 50%;
  position: absolute;
  border: 1px solid var(--shop-item-color);
  box-shadow: 0 0 6px var(--shop-item-color);
}
.shop-halo { inset: 22px 8px 14px; transform: rotate(-15deg); }
.shop-halo::before { content: ""; inset: 3px 2px; opacity: .65; }
.shop-halo::after { content: ""; inset: -4px -5px; border-style: dashed; opacity: .55; }
.shop-sparks {
  width: 3px;
  height: 3px;
  position: absolute;
  top: 15px;
  left: 20px;
  border-radius: 50%;
  background: var(--shop-item-color);
  color: var(--shop-item-color);
  box-shadow: 19px 2px currentColor, 8px -6px currentColor, -7px 26px currentColor, 24px 21px currentColor, 30px -4px currentColor;
}
.shop-item-details { min-width: 0; }
.shop-item-type { display: block; color: var(--shop-item-color); font-weight: 750; font-size: 13px; }
.shop-item-details h3 { font-size: clamp(16px, 2.9vw, 20px); line-height: 1.25; margin: 3px 0 4px; }
#shop-dialog .shop-item-details p { color: #e0cde7; font-size: 14px; line-height: 1.42; }
.shop-item-actions { display: grid; gap: 4px; align-content: center; text-align: center; }
.shop-item--aura .shop-item-actions { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; text-align: right; }
.shop-action {
  border: 1px solid color-mix(in srgb,var(--shop-item-color) 74%,#755775);
  border-radius: 4px;
  background: color-mix(in srgb,var(--shop-item-color) 25%, #2b1b35);
  min-height: 42px;
  padding: 5px 9px;
  color: #fff3fa;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}
.shop-action:not(:disabled):hover { background: color-mix(in srgb,var(--shop-item-color) 39%, #2b1b35); }
.shop-action:disabled { color: #c3aecb; border-color: #67526f; background: #2a2034; cursor: default; }
.shop-action[data-shop-action="owned"] { color: var(--shop-item-color); }
.shop-item-status { color: #d0bddb; font-size: 13px; }
.shop-item--equipped .shop-item-status { color: var(--shop-item-color); }
.shop-foot { margin-top: 13px; display: grid; gap: 4px; }
#shop-dialog .shop-foot p { color: #cbb6d5; font-size: 13px; }
#shop-dialog .shop-feedback { color: #ffc58e; min-height: 1.6em; }
@media (max-width: 490px) {
  .shop-items { grid-template-columns: 1fr; gap: 7px; }
  .shop-item--fighter { grid-template-columns: 65px minmax(0, 1fr) auto; gap: 7px; padding-right: 8px; }
  .shop-item--fighter .shop-item-art img { height: 158%; width: 140%; inset: 11% auto auto -17%; }
  .shop-item--aura { grid-template-columns: 42px minmax(0,1fr) auto; gap: 7px; padding: 8px; }
  .shop-item--aura .shop-item-art { width: 42px; height: 45px; }
  .shop-halo { inset: 18px 5px 11px; }
  .shop-sparks { top: 11px; left: 10px; }
  .shop-item--aura .shop-item-actions { grid-column: auto; grid-template-columns: initial; text-align: center; }
  .shop-item-status { font-size: 12px; }
  .shop-action { padding-inline: 6px; font-size: 13px; }
}
@media (max-width: 350px) {
  .shop-item--fighter { grid-template-columns: 59px minmax(0, 1fr); padding: 8px; }
  .shop-item--fighter .shop-item-art { min-height: 92px; border-radius: 3px; }
  .shop-item--fighter .shop-item-actions { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items:center; text-align:right; }
  .shop-item--aura .shop-item-art { width: 33px; }
  .shop-item--aura { grid-template-columns: 33px minmax(0,1fr) auto; }
}
