.pr {
  position: relative;
  width: 540px;
  height: 540px;
  overflow: hidden;
  isolation: isolate;
  background: #000;
  color: #ededed;
  font-family: "Geist Variable", sans-serif;
  font-feature-settings: "ss11", "rlig", "calt" 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
}

.pr * { box-sizing: border-box; }

/* The scene: glass, light and the floor's drawing, in one WebGL canvas. */
.pr-view {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 540px;
  height: 540px;
  pointer-events: none;
}

/* The hue slider is the stage; its thumb is the prism. The simulation turns
   the prism, and the pointer goes to the hit area instead. */
.pr-stage {
  position: absolute !important;
  pointer-events: none;
}

.pr-prism {
  position: absolute !important;
  inset: 0 !important;
  width: 100%;
  height: 100%;
  translate: none;
  outline: none;
}

.pr-hit {
  position: absolute;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
}

.pr-hit:active { cursor: grabbing; }

/* The readout: what the detector reports, on hairlines. */
.pr-read {
  position: absolute;
  left: 40px;
  top: 326px;
  width: 204px;
}

.pr-swatch {
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--color-picker-color);
  box-shadow: inset 0 0 0 1px #ffffff29;
}

.pr-hex {
  display: block;
  width: 100%;
  height: 36px;
  margin: 0 0 20px;
  padding: 0 0 0 44px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: none;
  color: #ededed;
  caret-color: #ededed;
  font-family: "Geist Mono Variable", monospace;
  font-size: 30px;
  font-weight: 500;
  font-variant-numeric: tabular-nums slashed-zero;
  line-height: 36px;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  user-select: text;
  -webkit-user-select: text;
}

.pr-hex::selection,
.pr-hue::selection { background: #ededed; color: #000; }

.pr-hex:focus-visible { box-shadow: 0 9px 0 -8px #ededed; }

.pr-specs { margin: 0; }

.pr-specs div {
  display: flex;
  align-items: baseline;
  height: 35px;
  border-top: 1px solid #ffffff24;
  line-height: 34px;
}

.pr-specs dt { flex: 1; color: #a1a1a1; font-size: 13px; letter-spacing: -0.005em; }

.pr-specs dd {
  display: flex;
  align-items: baseline;
  margin: 0;
  font-family: "Geist Mono Variable", monospace;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums slashed-zero;
  letter-spacing: -0.01em;
}

.pr-specs small { color: #888; font-size: inherit; font-weight: 400; white-space: pre; }
.pr-specs [data-dark] span { color: #888; }

.pr-hue {
  width: 48px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: none;
  color: inherit;
  font: inherit;
  font-variant-numeric: inherit;
  letter-spacing: inherit;
  text-align: right;
  appearance: textfield;
  -moz-appearance: textfield;
  user-select: text;
  -webkit-user-select: text;
}

.pr-hue::-webkit-inner-spin-button,
.pr-hue::-webkit-outer-spin-button { display: none; }

.pr-hue:focus-visible { box-shadow: 0 -5px 0 -4px #ededed inset; }

/* Wavelength and angle are typed like the hue: real fields on the hairlines,
   stepped with the arrows and clamped on the way out. */
.pr-num {
  width: 52px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: none;
  color: inherit;
  font: inherit;
  font-variant-numeric: inherit;
  letter-spacing: inherit;
  text-align: right;
  appearance: textfield;
  -moz-appearance: textfield;
  user-select: text;
  -webkit-user-select: text;
  caret-color: #ededed;
}

.pr-num::-webkit-inner-spin-button,
.pr-num::-webkit-outer-spin-button { display: none; }

.pr-num:focus-visible { box-shadow: 0 -5px 0 -4px #ededed inset; }

.pr-specs [data-dark] { color: #888; }
