.fg {
  position: relative;
  width: 540px;
  height: 540px;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  color: #171717;
  font-family: "Geist Variable", sans-serif;
}

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

.fg-field {
  position: absolute;
  left: 36px;
  top: 97px;
  display: grid;
  grid-template: "label toggle" 32px "pane pane" 300px / 1fr 32px;
  row-gap: 14px;
  align-items: center;
  width: 468px;
}

.fg-label {
  grid-area: label;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.006em;
}

.fg-toggle {
  grid-area: toggle;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 1px #00000024;
  color: #171717;
  cursor: pointer;
}

.fg-toggle:hover { background: #fafafa; }

.fg-toggle svg {
  width: 16px;
  height: 16px;
}

.fg-toggle:focus-visible { box-shadow: 0 0 0 1px #00000024, 0 0 0 2px #fff, 0 0 0 4px #0070f3; }

/* the pane of glass over the field: a finger on it wipes */
.fg-pane {
  grid-area: pane;
  position: relative;
  height: 300px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #00000024;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* the ring is for the keyboard: a finger on the glass does not draw it */
.fg-pane[data-keys]:has(.fg-input:focus) { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0070f3; }

.fg-glass {
  display: block;
  width: 468px;
  height: 300px;
  border-radius: 6px;
}

/* the field itself: what it holds is drawn behind the glass */
.fg-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font: 500 37px "Geist Mono Variable", monospace;
  text-align: center;
  pointer-events: none;
}

.fg-input::selection {
  background: transparent;
  color: transparent;
}

.fg-input::placeholder { color: transparent; }
