:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  background: #f7f6f3;
  color: #1c1917;
}

body {
  margin: 0;
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.brand,
footer,
#balance {
  color: #57534e;
}

h1,
h2 {
  font-weight: 650;
  letter-spacing: 0;
}

form,
section {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Author display:grid beats the user-agent [hidden] rule unless this wins. */
form[hidden],
section[hidden],
#chosen[hidden],
[hidden] {
  display: none !important;
}

#chosen {
  display: grid;
  gap: 0.75rem;
}

#animal-name {
  scroll-margin-top: 1rem;
}

#upload button[type="submit"] {
  scroll-margin-bottom: 1rem;
}

button,
a.download {
  background: #1c1917;
  color: #f7f6f3;
  border: 0;
  padding: 0.7rem 1rem;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  width: fit-content;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

#packs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

img {
  max-width: 100%;
  height: auto;
  background: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

#sources {
  flex-wrap: wrap;
}

.examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.examples figure {
  margin: 0;
}

.examples img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #d6d3d1;
}

.examples figcaption {
  color: #57534e;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

#library-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

#library-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#library-list li .actions {
  flex: 1;
}

#library-list li.empty {
  display: block;
  color: #57534e;
}

#library-list .confirm-note {
  flex-basis: 100%;
  color: #57534e;
}

#library-list img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
}

#library-list span {
  color: #57534e;
}

#error:empty,
#status:empty {
  display: none;
}

#error {
  color: #9f1239;
}

footer {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

#reset-wallet,
#library-list button.remove,
#library-list button.keep {
  background: none;
  padding: 0;
  text-decoration: underline;
}

#reset-wallet {
  color: inherit;
}

#library-list button.remove,
#library-list button.keep {
  color: #57534e;
}

#library-list button.remove {
  margin-left: auto;
}

#library-list button.remove-yes {
  background: none;
  color: #9f1239;
  padding: 0;
  text-decoration: underline;
}
