#image-grant {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid #dbeaf2;
  border-radius: 14px;
  background: #f7fbfd;
  color: #1f3442;
}

#image-grant h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

#image-grant .image-grant-key {
  margin: 0 0 0.5rem;
  color: #28536b;
  font-weight: 600;
  word-break: break-word;
}

#image-grant .image-grant-status {
  min-height: 1.4em;
  margin: 0.25rem 0 0.5rem;
  color: #28536b;
}

#image-grant fieldset {
  margin: 0.5rem 0;
  padding: 0.75rem;
  border: 1px solid #dbeaf2;
  border-radius: 10px;
}

#image-grant legend {
  padding: 0 0.25rem;
  color: #28536b;
}

#image-grant label {
  display: block;
  margin: 0.5rem 0;
}

#image-grant label.check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

#image-grant input[type="number"] {
  width: 8rem;
  max-width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #cfe2ec;
  border-radius: 8px;
  background: #fff;
}

#image-grant .image-grant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

#image-grant button {
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #2f6f8f;
  border-radius: 8px;
  background: #2f6f8f;
  color: #fff;
  cursor: pointer;
}

#image-grant button.secondary {
  background: #fff;
  color: #28536b;
  border-color: #b9d6e4;
}

#image-grant button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#image-grant button:focus-visible,
#image-grant input:focus-visible {
  outline: 2px solid #7dbbd6;
  outline-offset: 2px;
}

#image-grant .image-grant-scope-state {
  min-height: 1.4em;
  margin: 0.25rem 0 0.5rem;
  color: #3b6174;
}

#image-grant .notice {
  margin: 0.75rem 0 0;
  color: #456779;
  line-height: 1.5;
  font-size: 0.92rem;
}

@media (max-width: 430px) {
  #image-grant {
    padding: 0.875rem;
  }

  #image-grant .image-grant-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  #image-grant button,
  #image-grant input[type="number"] {
    width: 100%;
  }
}
