:root {
  --bg-0: #050608;
  --bg-1: #0c1014;
  --bg-2: #11161c;
  --text: #c8d0d8;
  --text-faint: rgba(200, 208, 216, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #fff;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
    monospace;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

body {
  display: grid;
  place-items: center;
  padding: 16px;
}

.device {
  position: relative;
  height: min(95vh, calc(95vw * 2691 / 1674));
  aspect-ratio: 1674 / 2691;
  isolation: isolate;
}

.device::before {
  content: "";
  position: absolute;
  /*
    Slightly overfill the transparent screen hole in applewatch.png so the
    PNG's anti-aliased edge blends against black instead of the white page.
  */
  left: 7.25%;
  top: 20.65%;
  width: 81.45%;
  height: 58.1%;
  border-radius: 13% / 17%;
  background: #030406;
  z-index: 0;
}

.frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.watchface {
  position: absolute;
  /* Screen cutout in applewatch.png, measured from the transparent rect. */
  left: 7.65%;
  top: 21%;
  width: 80.65%;
  height: 57.34%;
  border-radius: 12% / 16%;
  background: #05070a;
  display: grid;
  grid-template-rows: 1fr;
  padding: 6.2% 5.8% 5.4%;
  overflow: hidden;
  z-index: 1;
}

.strip {
  display: none;
  align-items: center;
  justify-content: space-between;
  min-height: 10px;
  letter-spacing: 0.18em;
  font-size: clamp(7px, 1.45vmin, 10px);
  color: var(--text-faint);
  text-transform: uppercase;
}

.strip.top {
  padding-bottom: 2px;
}

.strip.bottom {
  padding-top: 2px;
  justify-content: center;
}

.board-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

#board {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: auto;
}
