# Chili heat level filter

> Five chillies light up from yellow to deep red to show how much spice you can handle.

- Category: [Filters](https://library.aimran.es/components/filters)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-f-chili-heat
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A rating-style filter for menus and food delivery where the scale is heat instead of stars. Each chilli is an inline SVG whose colour comes from a CSS variable, the radio group fills every pepper up to the chosen one, and a gradient bar and a short word confirm the level. At the top level the peppers glow.

The main colour sets the hottest pepper and the second one starts the bar, so you can go from mild green to fiery red. Rename the levels to match your kitchen, or reuse the pattern with other icons for sweetness or strength.

## Code

### HTML

```html
<fieldset class="uvq05-ch"><legend>Maximum heat</legend><div class="row"><label style="--h:#f7c548"><input type="radio" name="uvq05-ch" aria-label="Mild"><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" stroke-width="2.2" stroke-linecap="round"/><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50"/><path class="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z"/><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" stroke-opacity=".45" stroke-width="1.4" stroke-linecap="round"/></svg></label><label style="--h:#f59e0b"><input type="radio" name="uvq05-ch" aria-label="Medium"><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" stroke-width="2.2" stroke-linecap="round"/><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50"/><path class="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z"/><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" stroke-opacity=".45" stroke-width="1.4" stroke-linecap="round"/></svg></label><label style="--h:#f06b1f"><input type="radio" name="uvq05-ch" aria-label="Spicy" checked><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" stroke-width="2.2" stroke-linecap="round"/><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50"/><path class="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z"/><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" stroke-opacity=".45" stroke-width="1.4" stroke-linecap="round"/></svg></label><label style="--h:var(--c1)"><input type="radio" name="uvq05-ch" aria-label="Very hot"><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" stroke-width="2.2" stroke-linecap="round"/><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50"/><path class="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z"/><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" stroke-opacity=".45" stroke-width="1.4" stroke-linecap="round"/></svg></label><label style="--h:#a3121f"><input type="radio" name="uvq05-ch" aria-label="Fire"><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" stroke-width="2.2" stroke-linecap="round"/><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50"/><path class="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z"/><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" stroke-opacity=".45" stroke-width="1.4" stroke-linecap="round"/></svg></label></div><div class="bar" aria-hidden="true"><i></i></div><p class="lv" aria-hidden="true"><span>Mild</span><span>Medium</span><span>Spicy</span><span>Very hot</span><span>Fire</span></p></fieldset>
```

### CSS

```css
.uvq05-ch {
  --c1: #e23d28;
  --c2: #3aa655;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq05-ch {
  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;
  width: 16em;
  --w: 60%;
}

.uvq05-ch legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq05-ch .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: .6em .8em .5em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label {
  position: relative;
  padding: .15em;
  border-radius: .6em;
  cursor: pointer;
  --f: color-mix(in srgb,var(--fg) 22%,transparent);
}

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

.uvq05-ch svg {
  display: block;
  width: 2em;
  height: 3.3em;
  transform-origin: 50% 10%;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),filter calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label:nth-of-type(odd) svg {
  rotate: -9deg;
}

.uvq05-ch label:nth-of-type(even) svg {
  rotate: 8deg;
}

.uvq05-ch svg .bd {
  fill: var(--f);
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label:hover svg {
  transform: translateY(-.25em) scale(1.06);
}

.uvq05-ch label:active svg {
  transform: scale(.88);
}

.uvq05-ch label:has(input:focus-visible) {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-ch label:has(input:checked) svg {
  animation: uvq05-chw calc(1.8s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite;
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) {
  --w: 20%;
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) label:nth-of-type(-n+1) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) .lv span:nth-child(1) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) {
  --w: 40%;
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) label:nth-of-type(-n+2) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) .lv span:nth-child(2) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) {
  --w: 60%;
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) label:nth-of-type(-n+3) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) .lv span:nth-child(3) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) {
  --w: 80%;
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) label:nth-of-type(-n+4) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) .lv span:nth-child(4) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) {
  --w: 100%;
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) label:nth-of-type(-n+5) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) .lv span:nth-child(5) {
  display: inline-block;
}

@media (hover:hover) {
  .uvq05-ch .row:hover label:is(:hover,:has(~ label:hover)) .bd {
    fill: var(--h);
  }
  .uvq05-ch .row:hover label:hover ~ label .bd {
    fill: color-mix(in srgb,var(--fg) 22%,transparent);
  }
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) .row {
  background: color-mix(in srgb,#ff5a1f 16%,transparent);
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) svg {
  filter: drop-shadow(0 0 .35em #ff5a1f);
}

.uvq05-ch .bar {
  position: relative;
  height: .42em;
  margin: .75em .2em 0;
  border-radius: 1em;
  overflow: hidden;
  background: linear-gradient(90deg,var(--c2),#f7c548 25%,#f06b1f 55%,var(--c1) 78%,#a3121f);
}

.uvq05-ch .bar i {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: calc(100% - var(--w));
  background: color-mix(in srgb,var(--fg) 12%,var(--bg));
  transition: width calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq05-ch .lv {
  height: 1.4em;
  margin: .55em .2em 0;
  font-weight: 800;
}

.uvq05-ch .lv span {
  display: none;
  animation: uvq05-chp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

@keyframes uvq05-chw {
  0%,62%,100% {
    transform: none;
  }
  70% {
    transform: rotate(9deg);
  }
  80% {
    transform: rotate(-7deg);
  }
  90% {
    transform: rotate(3deg);
  }
}

@keyframes uvq05-chp {
  from {
    transform: translateY(.4em) scale(.8);
    opacity: 0;
  }
}

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

### React

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

const css = `
.uvq05-ch {
  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;
  width: 16em;
  --w: 60%;
}

.uvq05-ch legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq05-ch .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: .6em .8em .5em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label {
  position: relative;
  padding: .15em;
  border-radius: .6em;
  cursor: pointer;
  --f: color-mix(in srgb,var(--fg) 22%,transparent);
}

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

.uvq05-ch svg {
  display: block;
  width: 2em;
  height: 3.3em;
  transform-origin: 50% 10%;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),filter calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label:nth-of-type(odd) svg {
  rotate: -9deg;
}

.uvq05-ch label:nth-of-type(even) svg {
  rotate: 8deg;
}

.uvq05-ch svg .bd {
  fill: var(--f);
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label:hover svg {
  transform: translateY(-.25em) scale(1.06);
}

.uvq05-ch label:active svg {
  transform: scale(.88);
}

.uvq05-ch label:has(input:focus-visible) {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-ch label:has(input:checked) svg {
  animation: uvq05-chw calc(1.8s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite;
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) {
  --w: 20%;
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) label:nth-of-type(-n+1) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) .lv span:nth-child(1) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) {
  --w: 40%;
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) label:nth-of-type(-n+2) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) .lv span:nth-child(2) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) {
  --w: 60%;
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) label:nth-of-type(-n+3) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) .lv span:nth-child(3) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) {
  --w: 80%;
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) label:nth-of-type(-n+4) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) .lv span:nth-child(4) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) {
  --w: 100%;
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) label:nth-of-type(-n+5) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) .lv span:nth-child(5) {
  display: inline-block;
}

@media (hover:hover) {
  .uvq05-ch .row:hover label:is(:hover,:has(~ label:hover)) .bd {
    fill: var(--h);
  }
  .uvq05-ch .row:hover label:hover ~ label .bd {
    fill: color-mix(in srgb,var(--fg) 22%,transparent);
  }
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) .row {
  background: color-mix(in srgb,#ff5a1f 16%,transparent);
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) svg {
  filter: drop-shadow(0 0 .35em #ff5a1f);
}

.uvq05-ch .bar {
  position: relative;
  height: .42em;
  margin: .75em .2em 0;
  border-radius: 1em;
  overflow: hidden;
  background: linear-gradient(90deg,var(--c2),#f7c548 25%,#f06b1f 55%,var(--c1) 78%,#a3121f);
}

.uvq05-ch .bar i {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: calc(100% - var(--w));
  background: color-mix(in srgb,var(--fg) 12%,var(--bg));
  transition: width calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq05-ch .lv {
  height: 1.4em;
  margin: .55em .2em 0;
  font-weight: 800;
}

.uvq05-ch .lv span {
  display: none;
  animation: uvq05-chp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

@keyframes uvq05-chw {
  0%,62%,100% {
    transform: none;
  }
  70% {
    transform: rotate(9deg);
  }
  80% {
    transform: rotate(-7deg);
  }
  90% {
    transform: rotate(3deg);
  }
}

@keyframes uvq05-chp {
  from {
    transform: translateY(.4em) scale(.8);
    opacity: 0;
  }
}

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

export default function FChiliHeat() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#e23d28",
          "--c2": "#3aa655",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq05-ch"><legend>Maximum heat</legend><div className="row"><label style={{ "--h": "#f7c548" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Mild" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "#f59e0b" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Medium" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "#f06b1f" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Spicy" checked={true} /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "var(--c1)" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Very hot" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "#a3121f" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Fire" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label></div><div className="bar" aria-hidden="true"><i></i></div><p className="lv" aria-hidden="true"><span>Mild</span><span>Medium</span><span>Spicy</span><span>Very hot</span><span>Fire</span></p></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 “Chili heat level filter” block (Filters) from AIMRAN Library to my project.

## What it is
Five chillies light up from yellow to deep red to show how much spice you can handle.

## Chosen settings
- Main color: #e23d28
- Secondary color: #3aa655
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Picante máximo"

## 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 = `
.uvq05-ch {
  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;
  width: 16em;
  --w: 60%;
}

.uvq05-ch legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq05-ch .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: .6em .8em .5em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label {
  position: relative;
  padding: .15em;
  border-radius: .6em;
  cursor: pointer;
  --f: color-mix(in srgb,var(--fg) 22%,transparent);
}

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

.uvq05-ch svg {
  display: block;
  width: 2em;
  height: 3.3em;
  transform-origin: 50% 10%;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),filter calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label:nth-of-type(odd) svg {
  rotate: -9deg;
}

.uvq05-ch label:nth-of-type(even) svg {
  rotate: 8deg;
}

.uvq05-ch svg .bd {
  fill: var(--f);
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-ch label:hover svg {
  transform: translateY(-.25em) scale(1.06);
}

.uvq05-ch label:active svg {
  transform: scale(.88);
}

.uvq05-ch label:has(input:focus-visible) {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-ch label:has(input:checked) svg {
  animation: uvq05-chw calc(1.8s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite;
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) {
  --w: 20%;
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) label:nth-of-type(-n+1) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(1) input:checked) .lv span:nth-child(1) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) {
  --w: 40%;
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) label:nth-of-type(-n+2) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(2) input:checked) .lv span:nth-child(2) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) {
  --w: 60%;
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) label:nth-of-type(-n+3) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(3) input:checked) .lv span:nth-child(3) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) {
  --w: 80%;
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) label:nth-of-type(-n+4) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(4) input:checked) .lv span:nth-child(4) {
  display: inline-block;
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) {
  --w: 100%;
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) label:nth-of-type(-n+5) {
  --f: var(--h);
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) .lv span:nth-child(5) {
  display: inline-block;
}

@media (hover:hover) {
  .uvq05-ch .row:hover label:is(:hover,:has(~ label:hover)) .bd {
    fill: var(--h);
  }
  .uvq05-ch .row:hover label:hover ~ label .bd {
    fill: color-mix(in srgb,var(--fg) 22%,transparent);
  }
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) .row {
  background: color-mix(in srgb,#ff5a1f 16%,transparent);
}

.uvq05-ch:has(label:nth-of-type(5) input:checked) svg {
  filter: drop-shadow(0 0 .35em #ff5a1f);
}

.uvq05-ch .bar {
  position: relative;
  height: .42em;
  margin: .75em .2em 0;
  border-radius: 1em;
  overflow: hidden;
  background: linear-gradient(90deg,var(--c2),#f7c548 25%,#f06b1f 55%,var(--c1) 78%,#a3121f);
}

.uvq05-ch .bar i {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: calc(100% - var(--w));
  background: color-mix(in srgb,var(--fg) 12%,var(--bg));
  transition: width calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq05-ch .lv {
  height: 1.4em;
  margin: .55em .2em 0;
  font-weight: 800;
}

.uvq05-ch .lv span {
  display: none;
  animation: uvq05-chp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

@keyframes uvq05-chw {
  0%,62%,100% {
    transform: none;
  }
  70% {
    transform: rotate(9deg);
  }
  80% {
    transform: rotate(-7deg);
  }
  90% {
    transform: rotate(3deg);
  }
}

@keyframes uvq05-chp {
  from {
    transform: translateY(.4em) scale(.8);
    opacity: 0;
  }
}

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

export default function FChiliHeat() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#e23d28",
          "--c2": "#3aa655",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq05-ch"><legend>Maximum heat</legend><div className="row"><label style={{ "--h": "#f7c548" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Mild" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "#f59e0b" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Medium" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "#f06b1f" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Spicy" checked={true} /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "var(--c1)" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Very hot" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label><label style={{ "--h": "#a3121f" } as CSSProperties}><input type="radio" name="uvq05-ch" aria-label="Fire" /><svg viewBox="0 0 24 40" aria-hidden="true"><path d="M12 9c0-3 1.5-5.5 4.5-6.5" fill="none" stroke="#3f8f3a" strokeWidth="2.2" strokeLinecap="round" /><path d="M7.5 10.5c1.5-2 7.5-2 9 0l-.5 2.5h-8z" fill="#4caf50" /><path className="bd" d="M7.8 12.5h8.4c1.2 7.5-.2 15-3.2 21.5-1.2 2.6-3.6 3.3-4.6 1.4 2.4-5.4 1.6-13.8-.6-22.9z" /><path d="M10.2 15c.6 4 .7 8.4-.3 12.6" fill="none" stroke="#fff" strokeOpacity=".45" strokeWidth="1.4" strokeLinecap="round" /></svg></label></div><div className="bar" aria-hidden="true"><i></i></div><p className="lv" aria-hidden="true"><span>Mild</span><span>Medium</span><span>Spicy</span><span>Very hot</span><span>Fire</span></p></fieldset>
      </div>
    </>
  );
}
```

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