:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  color: #17212b;
  background: #f3f5f7;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 2rem 1rem;
}

.page {
  box-sizing: border-box;
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: clamp(1.25rem, 5vw, 2rem);
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1rem rgb(0 0 0 / 8%);
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.2;
}

.page-header {
  margin-bottom: 1.5rem;
}

.amount {
  margin: 0.75rem 0 0;
  font-weight: 700;
}

form {
  display: grid;
  gap: 0.5rem;
}

label {
  margin-top: 0.5rem;
  font-weight: 600;
}

.hint {
  margin: 0;
  color: #4a5662;
  font-size: 0.9rem;
}

.field-error {
  margin: 0;
  color: #9c2525;
  font-size: 0.9rem;
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

input,
select,
button {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
}

input,
select {
  border: 1px solid #778391;
  border-radius: 0.375rem;
  background: #fff;
  color: inherit;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid #82b8e8;
  outline-offset: 2px;
}

button {
  margin-top: 0.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: #145da0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #0e477c;
}

.message:empty {
  display: none;
}

.message {
  margin: 1rem 0 0;
  color: #17613a;
  font-weight: 600;
}

#qr-result:not(:empty) {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #d5dbe1;
}

#qr-result img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto 0;
}

@media (max-width: 30rem) {
  body {
    padding: 1rem 0.75rem;
  }

  .page {
    border-radius: 0.5rem;
  }
}
