.phone-shop-dialog {
  position: fixed;
  inset: 0;
  width: min(860px, calc(100% - 24px));
  max-width: none;
  max-height: min(840px, calc(100% - 24px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: 0 24px 64px #0007;
}
.phone-shop-dialog[open] { display: flex; flex-direction: column; }
.phone-shop-dialog::backdrop { background: #101520ac; }
.phone-shop-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.phone-shop-head img { flex: none; object-fit: contain; }
.phone-shop-head h3, .phone-detail h4 { margin: 0; }
.phone-shop-head small { color: var(--muted); }
.phone-shop-head .phone-shop-close { flex: none; min-width: 44px; min-height: 44px; margin-inline-start: auto; }
.phone-shop-loading { padding: 12px 20px; }
.phone-shop-body { overflow: auto; padding: 16px 20px 20px; }
.phone-detail {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, #5996b5 12%, var(--card2)), var(--card2) 65%);
  border: 1px solid var(--line2);
  border-radius: 14px;
}
.phone-detail-art { display: grid; place-items: center; }
.phone-detail-art img { width: 100%; height: auto; }
.phone-detail-info { min-width: 0; }
.phone-detail h4 { font-size: clamp(19px, 3vw, 25px); line-height: 1.25; }
.phone-detail h4:focus { outline: none; }
.phone-description, .phone-shop-notice { margin: 6px 0; color: var(--muted); font-size: 13px; }
.phone-effects { margin: 6px 0; padding-inline-start: 18px; color: var(--text); font-size: 13px; }
.phone-price { color: var(--gold-text, var(--text)); font-size: clamp(15px, 2.3vw, 19px); overflow-wrap: anywhere; }
.phone-shop-actions, .phone-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.phone-shop-actions .btn, .phone-filters .btn { min-height: 44px; white-space: normal; }
.phone-filters { margin-block: 14px 10px; }
.phone-filters .btn[aria-pressed="true"], .phone-card[aria-pressed="true"] { border-color: var(--gold-text); }
.phone-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.phone-card {
  display: flex;
  min-width: 0;
  padding: 10px 6px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--card2);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.phone-card img { height: 80px; max-width: 100%; object-fit: contain; }
.phone-card b { font-size: 13px; overflow-wrap: anywhere; }
.phone-card span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.phone-owned, .phone-card em { color: var(--gold-text); font: inherit; font-size: 11px; }
.phone-shop-dialog :is(button):focus-visible { outline: 2px solid var(--gold-text); outline-offset: -2px; }
@media (max-width: 670px) {
  .phone-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .phone-shop-head, .phone-shop-body { padding-inline: 10px; }
  .phone-detail { grid-template-columns: 72px minmax(0, 1fr); padding: 10px; gap: 8px; }
  .phone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-filters .btn { padding-inline: 9px; }
}
