:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.6;
}

/* `form { display: grid }` would otherwise win over the hidden attribute. */
[hidden] {
  display: none !important;
}

.account {
  font-size: 0.9rem;
}

button.link {
  margin: 0 0 0 0.5rem;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  text-decoration: underline;
}

body {
  margin: 0;
  padding: 2rem 1rem;
}

main {
  max-width: 32rem;
  margin: 0 auto;
}

h1 {
  font-size: 1.5rem;
}

form {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

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

textarea {
  resize: vertical;
}

.hint {
  margin: 0;
  font-size: 0.85rem;
  text-align: right;
}

input,
textarea,
button {
  font: inherit;
  padding: 0.5rem;
}

button {
  margin-top: 1rem;
  cursor: pointer;
}

button:disabled {
  cursor: progress;
}

#status {
  min-height: 1.6em;
  margin-top: 1rem;
}

#status[data-kind="error"] {
  color: #c62828;
}

#status[data-kind="success"] {
  color: #2e7d32;
}

@media (prefers-color-scheme: dark) {
  #status[data-kind="error"] {
    color: #ef9a9a;
  }

  #status[data-kind="success"] {
    color: #a5d6a7;
  }
}
