.wallet-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .35);
}

.wallet-modal::backdrop {
  background: rgba(3, 6, 18, .78);
  backdrop-filter: blur(4px);
}

.wallet-modal-card {
  padding: 24px;
}

.wallet-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.wallet-modal-title {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.wallet-modal-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.wallet-modal-close:hover,
.wallet-modal-close:focus-visible {
  border-color: var(--coin);
  color: var(--coin);
  outline: none;
}

.wallet-modal-copy,
.wallet-modal-safety,
.wallet-picker-status {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.65;
}

.wallet-modal-copy {
  margin: 0 0 18px;
}

.wallet-picker-status {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  background: var(--bg-raised);
}

.wallet-picker-status[data-state="error"] {
  border-color: var(--legendary);
  color: var(--legendary);
}

.wallet-options {
  display: grid;
  gap: 10px;
}

.wallet-option {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.wallet-option:hover,
.wallet-option:focus-visible {
  border-color: var(--coin);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--coin);
  outline: none;
}

.wallet-option:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.wallet-option-icon,
.wallet-option-fallback {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--bg-card);
  object-fit: contain;
}

.wallet-option-fallback {
  color: var(--coin);
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
}

.wallet-option-copy {
  min-width: 0;
}

.wallet-option-name,
.wallet-option-detail {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-option-name {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.wallet-option-detail {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 10px;
}

.wallet-option-arrow {
  color: var(--coin);
  font-weight: 700;
}

.wallet-modal-safety {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.wallet-modal-safety strong {
  color: var(--uncommon);
}

@media (max-width: 520px) {
  .wallet-modal-card { padding: 18px; }
  .wallet-modal-title { font-size: 12px; }
  .wallet-option { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .wallet-option-icon,
  .wallet-option-fallback { width: 42px; height: 42px; }
}
