.sd {
  position: relative;
  width: 540px;
  height: 540px;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  color: #171717;
  font-family: "Geist Mono Variable", monospace;
  user-select: none;
  -webkit-user-select: none;
}

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

.sd-dial {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 540px;
  height: 540px;
}

/* the dial, under the field: the shadow is taken anywhere on it */
.sd-reach {
  position: absolute;
  inset: 96px 0 0;
  cursor: grab;
  touch-action: none;
}

.sd[data-held] .sd-reach { cursor: grabbing; }

.sd-field {
  position: absolute;
  left: 0;
  right: 0;
  top: 26px;
  display: flex;
  justify-content: center;
}

.sd-time {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px #00000024;
  font-size: 30px;
  font-weight: 500;
  line-height: 40px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sd-time:focus-within { box-shadow: 0 0 0 1px #00000024, 0 0 0 2px #fff, 0 0 0 4px #0070f3; }

.sd-time[data-invalid] { box-shadow: 0 0 0 1px #e5484d; color: #cb2a2f; }

.sd-time[data-invalid]:focus-within { box-shadow: 0 0 0 1px #e5484d, 0 0 0 2px #fff, 0 0 0 4px #0070f3; }

.sd-time [data-slot="time-input-segment"] {
  margin: 0;
  padding: 0 3px;
  border: 0;
  border-radius: 5px;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
  caret-color: transparent;
}

.sd-time input[data-slot="time-input-segment"] { width: calc(2ch + 6px); height: 40px; }

.sd-time input[data-slot="time-input-segment"]:focus { background: #0000000f; }

.sd-time input[data-slot="time-input-segment"]::placeholder { color: #8f8f8f; opacity: 1; }

.sd-time input[data-slot="time-input-segment"]::selection { background: transparent; }

.sd-time [data-type="literal"] { padding: 0 1px; color: #8f8f8f; }
