# Skirt length on a dress form

> A dress form with a flared skirt: each option sits at the height of its hem and the skirt grows or shrinks to it.

- Category: [Radio buttons](https://library.aimran.es/components/radios)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-rd-dress-hem
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A linen dress form on a wooden stand wears an A-line skirt, and the four length options, mini, knee, midi and maxi, are placed right at the height of their hem with dotted leader lines. Choosing one makes the skirt grow or shorten with a small sway, while a chalk line with two pins follows the hem. Good for fashion configurators, made-to-measure shops and sewing classes.

The main color is the skirt fabric and the secondary color the linen of the form. Lengths are plain em values in each label's style, so adjust them to your own garment and keep the option names short.

## Code

### HTML

```html
<fieldset class="uvq04-hem"><legend>Skirt length</legend><div class="st"><div class="fm" aria-hidden="true"><i class="nk"></i><i class="pl"></i><i class="bs"></i><i class="ts"></i><i class="sk"></i><i class="hm"></i></div><div class="op"><label style="--h:2.2em"><input type="radio" name="uvq04-hem"><span>Mini</span></label><label style="--h:3.8em"><input type="radio" name="uvq04-hem"><span>Knee</span></label><label style="--h:5.4em"><input type="radio" name="uvq04-hem" checked><span>Midi</span></label><label style="--h:7em"><input type="radio" name="uvq04-hem"><span>Maxi</span></label></div></div></fieldset>
```

### CSS

```css
.uvq04-hem {
  --c1: #9c2f55;
  --c2: #e7dcc6;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq04-hem {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.uvq04-hem legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq04-hem .st {
  display: flex;
  gap: .3em;
}

.uvq04-hem .fm {
  position: relative;
  width: 7.6em;
  height: 14.6em;
  --l: 5.4em;
}

.uvq04-hem .fm i {
  position: absolute;
  left: 50%;
}

.uvq04-hem .nk {
  top: .3em;
  width: .9em;
  height: 1.1em;
  margin-left: -.45em;
  border-radius: .2em .2em 0 0;
  background: linear-gradient(90deg,#6d4a2c,#b0845a 45%,#6d4a2c);
}

.uvq04-hem .nk::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -.45em;
  width: .7em;
  height: .7em;
  margin-left: -.35em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#d6ad7e,#6d4a2c);
}

.uvq04-hem .ts {
  top: 1.2em;
  width: 4.6em;
  height: 4.9em;
  margin-left: -2.3em;
  border-radius: 46% 46% 34% 34%/30% 30% 20% 20%;
  background: radial-gradient(circle at 35% 28%,rgba(255,255,255,.4),transparent 50%),repeating-linear-gradient(90deg,rgba(0,0,0,.035) 0 1px,transparent 1px 3px),var(--c2);
  box-shadow: inset -.45em -.3em .8em rgba(0,0,0,.16),0 .3em .6em -.3em rgba(0,0,0,.4);
}

.uvq04-hem .ts::after {
  content: "";
  position: absolute;
  left: 50%;
  top: .3em;
  bottom: .2em;
  border-left: 1px solid rgba(0,0,0,.18);
}

.uvq04-hem .pl {
  top: 6em;
  width: .28em;
  height: 8em;
  margin-left: -.14em;
  background: linear-gradient(90deg,#7c828a,#e2e5e8,#7c828a);
}

.uvq04-hem .bs {
  top: 13.9em;
  width: 4.4em;
  height: .4em;
  margin-left: -2.2em;
  border-radius: 1em;
  background: linear-gradient(#5a3e26,#3a2717);
  box-shadow: 0 .2em .3em rgba(0,0,0,.3);
}

.uvq04-hem .sk {
  top: 5.9em;
  width: calc(3.6em + var(--l) * .48);
  height: var(--l);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  clip-path: polygon(22% 0,78% 0,100% 100%,0 100%);
  background: repeating-linear-gradient(90deg,rgba(0,0,0,.14) 0 .08em,transparent .08em .75em,rgba(255,255,255,.12) .75em .82em,transparent .82em 1.2em),linear-gradient(90deg,color-mix(in srgb,var(--c1),#000 30%),var(--c1) 30%,color-mix(in srgb,var(--c1),#fff 12%) 50%,var(--c1) 70%,color-mix(in srgb,var(--c1),#000 34%));
  transition: height calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1),width calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-hem .hm {
  top: calc(5.9em + var(--l));
  width: calc(4.6em + var(--l) * .48);
  margin-top: .15em;
  border-top: 2px dashed color-mix(in srgb,var(--fg) 55%,transparent);
  transform: translateX(-50%);
  transition: top calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1),width calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-hem .hm::before,.uvq04-hem .hm::after {
  content: "";
  position: absolute;
  top: -.3em;
  width: .4em;
  height: .4em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#fff,#d9a53a 60%);
}

.uvq04-hem .hm::before {
  left: -.2em;
}

.uvq04-hem .hm::after {
  right: -.2em;
}

.uvq04-hem .op {
  position: relative;
  width: 6.2em;
}

.uvq04-hem label {
  position: absolute;
  left: .9em;
  top: calc(6em + var(--h) - .75em);
  cursor: pointer;
}

.uvq04-hem label::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 1.3em;
  border-top: 1.5px dotted color-mix(in srgb,var(--fg) 35%,transparent);
}

.uvq04-hem input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq04-hem label span {
  display: block;
  padding: .3em .75em;
  border-radius: 1em;
  font-size: .8em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 70%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: all calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem label:hover span {
  background: color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq04-hem label:active span {
  transform: scale(.95);
}

.uvq04-hem input:checked + span {
  color: #fff;
  background: var(--c1);
}

.uvq04-hem input:focus-visible + span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq04-hem:has(label:nth-of-type(1) input:checked) .fm {
  --l: 2.2em;
}

.uvq04-hem:has(label:nth-of-type(1) input:checked) .sk {
  animation: uvq04-hem1 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(2) input:checked) .fm {
  --l: 3.8em;
}

.uvq04-hem:has(label:nth-of-type(2) input:checked) .sk {
  animation: uvq04-hem2 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(3) input:checked) .fm {
  --l: 5.4em;
}

.uvq04-hem:has(label:nth-of-type(3) input:checked) .sk {
  animation: uvq04-hem3 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(4) input:checked) .fm {
  --l: 7em;
}

.uvq04-hem:has(label:nth-of-type(4) input:checked) .sk {
  animation: uvq04-hem4 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@keyframes uvq04-hem1 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem2 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem3 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem4 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq04-hem,.uvq04-hem *,.uvq04-hem *::before,.uvq04-hem *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
```

### React

```tsx
import type { CSSProperties } from "react";

const css = `
.uvq04-hem {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.uvq04-hem legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq04-hem .st {
  display: flex;
  gap: .3em;
}

.uvq04-hem .fm {
  position: relative;
  width: 7.6em;
  height: 14.6em;
  --l: 5.4em;
}

.uvq04-hem .fm i {
  position: absolute;
  left: 50%;
}

.uvq04-hem .nk {
  top: .3em;
  width: .9em;
  height: 1.1em;
  margin-left: -.45em;
  border-radius: .2em .2em 0 0;
  background: linear-gradient(90deg,#6d4a2c,#b0845a 45%,#6d4a2c);
}

.uvq04-hem .nk::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -.45em;
  width: .7em;
  height: .7em;
  margin-left: -.35em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#d6ad7e,#6d4a2c);
}

.uvq04-hem .ts {
  top: 1.2em;
  width: 4.6em;
  height: 4.9em;
  margin-left: -2.3em;
  border-radius: 46% 46% 34% 34%/30% 30% 20% 20%;
  background: radial-gradient(circle at 35% 28%,rgba(255,255,255,.4),transparent 50%),repeating-linear-gradient(90deg,rgba(0,0,0,.035) 0 1px,transparent 1px 3px),var(--c2);
  box-shadow: inset -.45em -.3em .8em rgba(0,0,0,.16),0 .3em .6em -.3em rgba(0,0,0,.4);
}

.uvq04-hem .ts::after {
  content: "";
  position: absolute;
  left: 50%;
  top: .3em;
  bottom: .2em;
  border-left: 1px solid rgba(0,0,0,.18);
}

.uvq04-hem .pl {
  top: 6em;
  width: .28em;
  height: 8em;
  margin-left: -.14em;
  background: linear-gradient(90deg,#7c828a,#e2e5e8,#7c828a);
}

.uvq04-hem .bs {
  top: 13.9em;
  width: 4.4em;
  height: .4em;
  margin-left: -2.2em;
  border-radius: 1em;
  background: linear-gradient(#5a3e26,#3a2717);
  box-shadow: 0 .2em .3em rgba(0,0,0,.3);
}

.uvq04-hem .sk {
  top: 5.9em;
  width: calc(3.6em + var(--l) * .48);
  height: var(--l);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  clip-path: polygon(22% 0,78% 0,100% 100%,0 100%);
  background: repeating-linear-gradient(90deg,rgba(0,0,0,.14) 0 .08em,transparent .08em .75em,rgba(255,255,255,.12) .75em .82em,transparent .82em 1.2em),linear-gradient(90deg,color-mix(in srgb,var(--c1),#000 30%),var(--c1) 30%,color-mix(in srgb,var(--c1),#fff 12%) 50%,var(--c1) 70%,color-mix(in srgb,var(--c1),#000 34%));
  transition: height calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1),width calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-hem .hm {
  top: calc(5.9em + var(--l));
  width: calc(4.6em + var(--l) * .48);
  margin-top: .15em;
  border-top: 2px dashed color-mix(in srgb,var(--fg) 55%,transparent);
  transform: translateX(-50%);
  transition: top calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1),width calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-hem .hm::before,.uvq04-hem .hm::after {
  content: "";
  position: absolute;
  top: -.3em;
  width: .4em;
  height: .4em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#fff,#d9a53a 60%);
}

.uvq04-hem .hm::before {
  left: -.2em;
}

.uvq04-hem .hm::after {
  right: -.2em;
}

.uvq04-hem .op {
  position: relative;
  width: 6.2em;
}

.uvq04-hem label {
  position: absolute;
  left: .9em;
  top: calc(6em + var(--h) - .75em);
  cursor: pointer;
}

.uvq04-hem label::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 1.3em;
  border-top: 1.5px dotted color-mix(in srgb,var(--fg) 35%,transparent);
}

.uvq04-hem input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq04-hem label span {
  display: block;
  padding: .3em .75em;
  border-radius: 1em;
  font-size: .8em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 70%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: all calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem label:hover span {
  background: color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq04-hem label:active span {
  transform: scale(.95);
}

.uvq04-hem input:checked + span {
  color: #fff;
  background: var(--c1);
}

.uvq04-hem input:focus-visible + span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq04-hem:has(label:nth-of-type(1) input:checked) .fm {
  --l: 2.2em;
}

.uvq04-hem:has(label:nth-of-type(1) input:checked) .sk {
  animation: uvq04-hem1 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(2) input:checked) .fm {
  --l: 3.8em;
}

.uvq04-hem:has(label:nth-of-type(2) input:checked) .sk {
  animation: uvq04-hem2 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(3) input:checked) .fm {
  --l: 5.4em;
}

.uvq04-hem:has(label:nth-of-type(3) input:checked) .sk {
  animation: uvq04-hem3 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(4) input:checked) .fm {
  --l: 7em;
}

.uvq04-hem:has(label:nth-of-type(4) input:checked) .sk {
  animation: uvq04-hem4 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@keyframes uvq04-hem1 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem2 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem3 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem4 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq04-hem,.uvq04-hem *,.uvq04-hem *::before,.uvq04-hem *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

export default function RdDressHem() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#9c2f55",
          "--c2": "#e7dcc6",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq04-hem"><legend>Skirt length</legend><div className="st"><div className="fm" aria-hidden="true"><i className="nk"></i><i className="pl"></i><i className="bs"></i><i className="ts"></i><i className="sk"></i><i className="hm"></i></div><div className="op"><label style={{ "--h": "2.2em" } as CSSProperties}><input type="radio" name="uvq04-hem" /><span>Mini</span></label><label style={{ "--h": "3.8em" } as CSSProperties}><input type="radio" name="uvq04-hem" /><span>Knee</span></label><label style={{ "--h": "5.4em" } as CSSProperties}><input type="radio" name="uvq04-hem" checked={true} /><span>Midi</span></label><label style={{ "--h": "7em" } as CSSProperties}><input type="radio" name="uvq04-hem" /><span>Maxi</span></label></div></div></fieldset>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Skirt length on a dress form” block (Radio buttons) from AIMRAN Library to my project.

## What it is
A dress form with a flared skirt: each option sits at the height of its hem and the skirt grows or shrinks to it.

## Chosen settings
- Main color: #9c2f55
- Secondary color: #e7dcc6
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Largo de la falda"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
import type { CSSProperties } from "react";

const css = `
.uvq04-hem {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.uvq04-hem legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq04-hem .st {
  display: flex;
  gap: .3em;
}

.uvq04-hem .fm {
  position: relative;
  width: 7.6em;
  height: 14.6em;
  --l: 5.4em;
}

.uvq04-hem .fm i {
  position: absolute;
  left: 50%;
}

.uvq04-hem .nk {
  top: .3em;
  width: .9em;
  height: 1.1em;
  margin-left: -.45em;
  border-radius: .2em .2em 0 0;
  background: linear-gradient(90deg,#6d4a2c,#b0845a 45%,#6d4a2c);
}

.uvq04-hem .nk::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -.45em;
  width: .7em;
  height: .7em;
  margin-left: -.35em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#d6ad7e,#6d4a2c);
}

.uvq04-hem .ts {
  top: 1.2em;
  width: 4.6em;
  height: 4.9em;
  margin-left: -2.3em;
  border-radius: 46% 46% 34% 34%/30% 30% 20% 20%;
  background: radial-gradient(circle at 35% 28%,rgba(255,255,255,.4),transparent 50%),repeating-linear-gradient(90deg,rgba(0,0,0,.035) 0 1px,transparent 1px 3px),var(--c2);
  box-shadow: inset -.45em -.3em .8em rgba(0,0,0,.16),0 .3em .6em -.3em rgba(0,0,0,.4);
}

.uvq04-hem .ts::after {
  content: "";
  position: absolute;
  left: 50%;
  top: .3em;
  bottom: .2em;
  border-left: 1px solid rgba(0,0,0,.18);
}

.uvq04-hem .pl {
  top: 6em;
  width: .28em;
  height: 8em;
  margin-left: -.14em;
  background: linear-gradient(90deg,#7c828a,#e2e5e8,#7c828a);
}

.uvq04-hem .bs {
  top: 13.9em;
  width: 4.4em;
  height: .4em;
  margin-left: -2.2em;
  border-radius: 1em;
  background: linear-gradient(#5a3e26,#3a2717);
  box-shadow: 0 .2em .3em rgba(0,0,0,.3);
}

.uvq04-hem .sk {
  top: 5.9em;
  width: calc(3.6em + var(--l) * .48);
  height: var(--l);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  clip-path: polygon(22% 0,78% 0,100% 100%,0 100%);
  background: repeating-linear-gradient(90deg,rgba(0,0,0,.14) 0 .08em,transparent .08em .75em,rgba(255,255,255,.12) .75em .82em,transparent .82em 1.2em),linear-gradient(90deg,color-mix(in srgb,var(--c1),#000 30%),var(--c1) 30%,color-mix(in srgb,var(--c1),#fff 12%) 50%,var(--c1) 70%,color-mix(in srgb,var(--c1),#000 34%));
  transition: height calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1),width calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-hem .hm {
  top: calc(5.9em + var(--l));
  width: calc(4.6em + var(--l) * .48);
  margin-top: .15em;
  border-top: 2px dashed color-mix(in srgb,var(--fg) 55%,transparent);
  transform: translateX(-50%);
  transition: top calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1),width calc(0.65s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-hem .hm::before,.uvq04-hem .hm::after {
  content: "";
  position: absolute;
  top: -.3em;
  width: .4em;
  height: .4em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#fff,#d9a53a 60%);
}

.uvq04-hem .hm::before {
  left: -.2em;
}

.uvq04-hem .hm::after {
  right: -.2em;
}

.uvq04-hem .op {
  position: relative;
  width: 6.2em;
}

.uvq04-hem label {
  position: absolute;
  left: .9em;
  top: calc(6em + var(--h) - .75em);
  cursor: pointer;
}

.uvq04-hem label::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 1.3em;
  border-top: 1.5px dotted color-mix(in srgb,var(--fg) 35%,transparent);
}

.uvq04-hem input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq04-hem label span {
  display: block;
  padding: .3em .75em;
  border-radius: 1em;
  font-size: .8em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 70%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: all calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem label:hover span {
  background: color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq04-hem label:active span {
  transform: scale(.95);
}

.uvq04-hem input:checked + span {
  color: #fff;
  background: var(--c1);
}

.uvq04-hem input:focus-visible + span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq04-hem:has(label:nth-of-type(1) input:checked) .fm {
  --l: 2.2em;
}

.uvq04-hem:has(label:nth-of-type(1) input:checked) .sk {
  animation: uvq04-hem1 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(2) input:checked) .fm {
  --l: 3.8em;
}

.uvq04-hem:has(label:nth-of-type(2) input:checked) .sk {
  animation: uvq04-hem2 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(3) input:checked) .fm {
  --l: 5.4em;
}

.uvq04-hem:has(label:nth-of-type(3) input:checked) .sk {
  animation: uvq04-hem3 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-hem:has(label:nth-of-type(4) input:checked) .fm {
  --l: 7em;
}

.uvq04-hem:has(label:nth-of-type(4) input:checked) .sk {
  animation: uvq04-hem4 calc(0.9s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@keyframes uvq04-hem1 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem2 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem3 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes uvq04-hem4 {
  0% {
    transform: translateX(-50%);
  }
  30% {
    transform: translateX(-50%) skewX(5deg);
  }
  60% {
    transform: translateX(-50%) skewX(-3deg);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq04-hem,.uvq04-hem *,.uvq04-hem *::before,.uvq04-hem *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

export default function RdDressHem() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#9c2f55",
          "--c2": "#e7dcc6",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq04-hem"><legend>Skirt length</legend><div className="st"><div className="fm" aria-hidden="true"><i className="nk"></i><i className="pl"></i><i className="bs"></i><i className="ts"></i><i className="sk"></i><i className="hm"></i></div><div className="op"><label style={{ "--h": "2.2em" } as CSSProperties}><input type="radio" name="uvq04-hem" /><span>Mini</span></label><label style={{ "--h": "3.8em" } as CSSProperties}><input type="radio" name="uvq04-hem" /><span>Knee</span></label><label style={{ "--h": "5.4em" } as CSSProperties}><input type="radio" name="uvq04-hem" checked={true} /><span>Midi</span></label><label style={{ "--h": "7em" } as CSSProperties}><input type="radio" name="uvq04-hem" /><span>Maxi</span></label></div></div></fieldset>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
