html {
  font-size: 1em;
}

body {
  margin: 0;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  font-size: 2.5rem;
  margin: 0.8rem 0.75rem 1rem;
}

h2 {
  font-size: 2rem;
  margin: 0.6rem 0.75rem;
}

#ruler-wrap {
  position: relative;
  display: inline-block;
  width: 90%;
  max-width: 800px;
  min-width: 0;
  touch-action: none;
}

#ruler {
  display: block;
  width: 100%;
  height: auto;
  max-width: 800px;
  cursor: ew-resize;
  vertical-align: top;
}

#ruler:focus {
  outline: 3px solid #2a5db0;
  outline-offset: 4px;
}

#highlight {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 255, 0.3);
  pointer-events: none;
}

.pie {
  --slice: 6.25%;
  position: relative;
  width: min(72vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 1rem auto 0;
  overflow: hidden;
  background: #c4a06a;
  cursor: pointer;
  touch-action: none;
}

.pie-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.22);
  pointer-events: none;
}

.pie-photo.is-under {
  filter: grayscale(1);
}

.pie-photo.is-slice {
  -webkit-mask-image: conic-gradient(from -90deg, #000 0 var(--slice), transparent var(--slice));
  mask-image: conic-gradient(from -90deg, #000 0 var(--slice), transparent var(--slice));
}

.pie.is-empty .pie-photo.is-slice {
  visibility: hidden;
}

.pie.is-full .pie-photo.is-slice {
  -webkit-mask-image: none;
  mask-image: none;
}

.pie-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-conic-gradient(
    from -90deg,
    transparent 0 21.7deg,
    rgba(40, 20, 10, 0.28) 21.7deg 22.5deg
  );
}

.game {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 1.25rem 0.75rem 2rem;
}

.inlineb {
  display: inline-block;
  padding: 0 2px;
}

@media screen and (max-width: 670px) {
  html {
    font-size: 0.85em;
  }
}

@media screen and (max-width: 550px) {
  html {
    font-size: 0.7em;
  }
}

@media screen and (max-width: 500px) {
  .game {
    margin: 8px;
    font-size: 1.5rem;
  }
}
