/* Give the timber stage a height on browsers that omit newer sizing units. */
.arena {
  height: 55vh;
  height: clamp(388px, 55vh, 648px);
  container-type: normal;
}

/* The image and the dart layer share a centered, perfectly square playing area
   inside these insets. Neither depends on canvas or container query units. */
.board-mount {
  position: absolute;
  top: 9px;
  bottom: 19px;
  left: 2.5%;
  right: 2.5%;
  width: auto;
  height: auto;
  margin: 0;
  aspect-ratio: auto;
  align-self: stretch;
  justify-self: stretch;
  filter: none;
  background: url(../media/board-face.webp) center center / contain no-repeat;
}

#board,
.board-vector-marks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#board {
  border-radius: 0;
}

.board-vector-marks {
  pointer-events: none;
}

.board-input-only {
  opacity: 0;
}

.board-input-only:focus-visible + .board-vector-marks {
  outline: 2px solid var(--lime);
}

@media (min-width: 1600px) {
  .arena {
    height: 56vh;
    height: clamp(550px, 56vh, 680px);
  }
}

@media (max-width: 760px) {
  .arena {
    height: 91vw;
    height: clamp(280px, 91vw, 485px);
  }

  .board-mount {
    top: 8px;
    bottom: 16px;
    left: 1.5%;
    right: 1.5%;
  }
}

/* Some Android browsers cast or request desktop pages at a 980px layout width. */
@media (min-width: 761px) and (max-width: 1100px) and (hover: none) and (pointer: coarse) {
  .match-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .arena {
    height: 72vw;
    height: clamp(380px, 72vw, 660px);
  }
}
