html {
  height: 100%;
}
body {
  height: 100%;
  margin: 0;
  --scroll-bar-width: 20px;
  min-height: 100vh;
  --button-width: min(72px, 3rem);
}
main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
}
h1 {
  font-size: 1.2rem;
  margin: 0;
  background: center / contain no-repeat url(./favicon.svg);
  height: 8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}
img {
  pointer-events: none;
  user-select: none;
}
button.item {
  /* 215 x 218 => 71.6 x 72.6 */
  /*width: 72px;
  height: 73px;*/
  width: 72px;
  aspect-ratio: 215 / 218;
  border: none;
  background: var(--image, url(./resources/unknown.png)) no-repeat
    center/contain;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}
.item-group button.item {
  width: var(--button-width);
}
button.item.selected::before {
  content: '';
  display: block;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: blue;
  opacity: 0.4;
  border-radius: 8px;
}
button.item::after {
  content: attr(data-amount);
  display: block;
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 1.4rem;
}
button.item.center::after {
  font-size: 1.5rem;
  display: flex;
  position: inherit;
  justify-content: center;
}
button.item.hidden {
  display: none;
}
.item-group {
  display: flex;
}
@media screen and (max-width: 720px) {
  body {
    --button-width: 72px;
  }
  .item-group {
    display: grid;
    grid-template-columns: repeat(auto, 3);
    grid-auto-rows: auto auto;
    grid-template-areas: 'reset items1 compare' 'reset items2 compare';
  }
  #reset {
    grid-area: reset;
  }
  #export {
    grid-area: items1;
  }
  #import {
    grid-area: items2;
  }
  #compare {
    grid-area: compare;
  }
}
#compare, #reset {
  font-size: 2rem;
  line-height: 2rem;
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
#reset {
  cursor: pointer;
  border: none;
  background: transparent;
}
section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
h2 {
  margin: 0;
  font-size: 1rem;
}
footer {
  text-align: center;
}
a {
  text-decoration: none;
  color: #37b9fb;
}
island-items {
  --width: var(--button-width);
}
