# Terracotta plant you can water

> A potted plant in terracotta: watering it drops water from the can, raises the soil moisture and lifts the drooping leaves.

- Category: [Cards](https://library.aimran.es/components/cards)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-card-plant-water
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A small story told with SVG and CSS: the leaves start droopy and yellowish, the can tilts, drops fall into the soil, the moisture bar rises and the leaves spring back with a bouncy curve. A second button skips a week and lets them sag again. It suits plant care apps, garden shops, habit trackers and smart sensor dashboards.

The main color is the terracotta pot and the warning text, the second the healthy leaf green. Rename the plant, adjust the moisture values in the script, or reuse the drooping effect for any status that needs care.

## Code

### HTML

```html
<article class="uvq07-plt"><div class="stg"><svg viewBox="0 0 120 130" aria-hidden="true"><defs><linearGradient id="uvq07-plt-g" x1="0" x2="1"><stop class="g1" offset="0"/><stop class="g2" offset=".45"/><stop class="g1" offset="1"/></linearGradient></defs><g class="lv"><g transform="translate(60 84) scale(0.8)"><g class="lf" style="--r:-52deg"><path class="sm" d="M0 0Q-1-14 0-28"/><path class="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z"/><path class="vn" d="M0-29L-2.4-55"/></g></g><g transform="translate(60 84) scale(1)"><g class="lf" style="--r:-24deg"><path class="sm" d="M0 0Q-1-14 0-28"/><path class="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z"/><path class="vn" d="M0-29L-2.4-55"/></g></g><g transform="translate(60 84) scale(1.14)"><g class="lf" style="--r:2deg"><path class="sm" d="M0 0Q-1-14 0-28"/><path class="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z"/><path class="vn" d="M0-29L-2.4-55"/></g></g><g transform="translate(60 84) scale(0.96)"><g class="lf" style="--r:27deg"><path class="sm" d="M0 0Q-1-14 0-28"/><path class="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z"/><path class="vn" d="M0-29L-2.4-55"/></g></g><g transform="translate(60 84) scale(0.78)"><g class="lf" style="--r:50deg"><path class="sm" d="M0 0Q-1-14 0-28"/><path class="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z"/><path class="vn" d="M0-29L-2.4-55"/></g></g></g><path class="pb" d="M34 92h52l-6 32H40z"/><rect class="rm" x="29" y="83" width="62" height="11" rx="2.5"/><ellipse class="so" cx="60" cy="84" rx="27" ry="2.4"/></svg><span class="dp" aria-hidden="true"><i style="--i:0"></i><i style="--i:1"></i><i style="--i:2"></i><i style="--i:3"></i><i style="--i:4"></i></span><span class="can" aria-hidden="true"><svg viewBox="0 0 32 24"><path d="M14 8h12v13H14z" fill="currentColor"/><path d="M14 11L4 5M2 3.5l4.5-.8.6 4.4zM26 10c4.5 0 4.5 8 0 8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span></div><h3>Living room monstera</h3><p class="mt"><span>Soil moisture</span><b>22 %</b><i></i></p><p class="st" aria-live="polite" data-a="Needs water" data-b="Well watered">Needs water</p><div class="bs"><button type="button" class="wa">Water</button><button type="button" class="wk">Skip a week</button></div></article>
```

### CSS

```css
.uvq07-plt {
  --c1: #c4643f;
  --c2: #3f8f5a;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq07-plt {
  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;
  width: 16em;
  padding: 1em;
  border-radius: 1.5em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent),0 24px 48px -30px rgba(0,0,0,.45);
}

.uvq07-plt .stg {
  position: relative;
  display: grid;
  place-items: end center;
  height: 10.5em;
  overflow: hidden;
  border-radius: 1em;
  background: radial-gradient(80% 70% at 50% 35%,color-mix(in srgb,var(--c2) 16%,transparent),transparent 70%),color-mix(in srgb,var(--fg) 4%,transparent);
}

.uvq07-plt .stg>svg {
  width: 9em;
  height: 9.75em;
}

.uvq07-plt .g1 {
  stop-color: color-mix(in srgb,var(--c1) 75%,#000);
}

.uvq07-plt .g2 {
  stop-color: color-mix(in srgb,var(--c1) 85%,#fff);
}

.uvq07-plt .pb {
  fill: url(#uvq07-plt-g);
}

.uvq07-plt .rm {
  fill: color-mix(in srgb,var(--c1) 88%,#fff);
}

.uvq07-plt .so {
  fill: #4a3426;
}

.uvq07-plt .lf {
  transform: rotate(calc(var(--r) * 2 + 8deg)) scale(.9,.84);
  transition: transform calc(1.1s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq07-plt.ok .lf {
  transform: rotate(var(--r));
}

.uvq07-plt .sm {
  fill: none;
  stroke: color-mix(in srgb,var(--c2) 70%,#6b5a2a);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.uvq07-plt .lp {
  fill: color-mix(in srgb,var(--c2) 35%,#b39a48);
  transition: fill calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-plt.ok .lp {
  fill: var(--c2);
}

.uvq07-plt .vn {
  fill: none;
  stroke: rgba(255,255,255,.35);
  stroke-width: 1;
}

.uvq07-plt .dp {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.uvq07-plt .dp i {
  position: absolute;
  top: 2.2em;
  left: calc(51% + var(--i) * .38em);
  width: .3em;
  height: .42em;
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  background: #5ab4e5;
  opacity: 0;
}

.uvq07-plt.wt .dp i {
  animation: uvq07-plt calc(0.7s / var(--k)) ease-in 3 both;
  animation-delay: calc(var(--i) * calc(0.11s / var(--k)));
}

.uvq07-plt .can {
  position: absolute;
  right: 1em;
  top: .7em;
  width: 2.7em;
  color: #64748b;
  transform-origin: 30% 70%;
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq07-plt .can svg {
  display: block;
  width: 100%;
}

.uvq07-plt.wt .can {
  transform: rotate(-26deg) translateX(-.2em);
}

.uvq07-plt h3 {
  margin: .9em 0 0;
  font-size: 1em;
  font-weight: 700;
}

.uvq07-plt .mt {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35em;
  margin: .6em 0 .35em;
  font-size: .78em;
}

.uvq07-plt .mt span {
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq07-plt .mt b {
  font-variant-numeric: tabular-nums;
}

.uvq07-plt .mt i {
  grid-column: 1/-1;
  height: .45em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  overflow: hidden;
}

.uvq07-plt .mt i::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--m,22%);
  border-radius: inherit;
  background: linear-gradient(90deg,#5ab4e5,color-mix(in srgb,#5ab4e5 40%,var(--c2)));
  transition: width calc(1.2s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq07-plt .st {
  margin: 0;
  font-size: .78em;
  font-weight: 700;
  color: var(--c1);
}

.uvq07-plt.ok .st {
  color: var(--c2);
}

.uvq07-plt .bs {
  display: flex;
  gap: .5em;
  margin-top: .9em;
}

.uvq07-plt .bs button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em .8em;
  border-radius: .8em;
  font-size: .82em;
  font-weight: 700;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-plt .bs .wa {
  flex: 1;
  color: #fff;
  background: var(--c2);
}

.uvq07-plt .bs .wk {
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq07-plt .bs .wk:hover {
  background: color-mix(in srgb,var(--fg) 11%,transparent);
}

.uvq07-plt .bs button:hover {
  transform: translateY(-1px);
}

.uvq07-plt .bs button:active {
  transform: scale(.95);
}

.uvq07-plt .bs button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq07-plt {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: .85;
    transform: translateY(4.6em);
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq07-plt").forEach(el => {
  const st=el.querySelector(".st"),mb=el.querySelector(".mt b"),mi=el.querySelector(".mt i"),sp=parseFloat(getComputedStyle(el).getPropertyValue("--k"))||1;let tm=[],m=22,raf=0;
const count=to=>{cancelAnimationFrame(raf);mi.style.setProperty("--m",to+"%");const from=m,t0=performance.now(),d=1200/sp;const f=now=>{const p=Math.min(1,(now-t0)/d);m=Math.round(from+(to-from)*p);mb.textContent=m+" %";if(p<1)raf=requestAnimationFrame(f)};raf=requestAnimationFrame(f)};
const later=(f,ms)=>tm.push(setTimeout(f,ms/sp));
el.querySelector(".wa").addEventListener("click",()=>{el.classList.remove("wt");void el.offsetWidth;el.classList.add("wt");later(()=>{el.classList.add("ok");st.textContent=st.dataset.b;count(84)},700);later(()=>el.classList.remove("wt"),2300)});
el.querySelector(".wk").addEventListener("click",()=>{el.classList.remove("ok");st.textContent=st.dataset.a;count(22)});
return()=>{tm.forEach(clearTimeout);cancelAnimationFrame(raf)}
});
```

### React

```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq07-plt {
  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;
  width: 16em;
  padding: 1em;
  border-radius: 1.5em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent),0 24px 48px -30px rgba(0,0,0,.45);
}

.uvq07-plt .stg {
  position: relative;
  display: grid;
  place-items: end center;
  height: 10.5em;
  overflow: hidden;
  border-radius: 1em;
  background: radial-gradient(80% 70% at 50% 35%,color-mix(in srgb,var(--c2) 16%,transparent),transparent 70%),color-mix(in srgb,var(--fg) 4%,transparent);
}

.uvq07-plt .stg>svg {
  width: 9em;
  height: 9.75em;
}

.uvq07-plt .g1 {
  stop-color: color-mix(in srgb,var(--c1) 75%,#000);
}

.uvq07-plt .g2 {
  stop-color: color-mix(in srgb,var(--c1) 85%,#fff);
}

.uvq07-plt .pb {
  fill: url(#uvq07-plt-g);
}

.uvq07-plt .rm {
  fill: color-mix(in srgb,var(--c1) 88%,#fff);
}

.uvq07-plt .so {
  fill: #4a3426;
}

.uvq07-plt .lf {
  transform: rotate(calc(var(--r) * 2 + 8deg)) scale(.9,.84);
  transition: transform calc(1.1s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq07-plt.ok .lf {
  transform: rotate(var(--r));
}

.uvq07-plt .sm {
  fill: none;
  stroke: color-mix(in srgb,var(--c2) 70%,#6b5a2a);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.uvq07-plt .lp {
  fill: color-mix(in srgb,var(--c2) 35%,#b39a48);
  transition: fill calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-plt.ok .lp {
  fill: var(--c2);
}

.uvq07-plt .vn {
  fill: none;
  stroke: rgba(255,255,255,.35);
  stroke-width: 1;
}

.uvq07-plt .dp {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.uvq07-plt .dp i {
  position: absolute;
  top: 2.2em;
  left: calc(51% + var(--i) * .38em);
  width: .3em;
  height: .42em;
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  background: #5ab4e5;
  opacity: 0;
}

.uvq07-plt.wt .dp i {
  animation: uvq07-plt calc(0.7s / var(--k)) ease-in 3 both;
  animation-delay: calc(var(--i) * calc(0.11s / var(--k)));
}

.uvq07-plt .can {
  position: absolute;
  right: 1em;
  top: .7em;
  width: 2.7em;
  color: #64748b;
  transform-origin: 30% 70%;
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq07-plt .can svg {
  display: block;
  width: 100%;
}

.uvq07-plt.wt .can {
  transform: rotate(-26deg) translateX(-.2em);
}

.uvq07-plt h3 {
  margin: .9em 0 0;
  font-size: 1em;
  font-weight: 700;
}

.uvq07-plt .mt {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35em;
  margin: .6em 0 .35em;
  font-size: .78em;
}

.uvq07-plt .mt span {
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq07-plt .mt b {
  font-variant-numeric: tabular-nums;
}

.uvq07-plt .mt i {
  grid-column: 1/-1;
  height: .45em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  overflow: hidden;
}

.uvq07-plt .mt i::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--m,22%);
  border-radius: inherit;
  background: linear-gradient(90deg,#5ab4e5,color-mix(in srgb,#5ab4e5 40%,var(--c2)));
  transition: width calc(1.2s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq07-plt .st {
  margin: 0;
  font-size: .78em;
  font-weight: 700;
  color: var(--c1);
}

.uvq07-plt.ok .st {
  color: var(--c2);
}

.uvq07-plt .bs {
  display: flex;
  gap: .5em;
  margin-top: .9em;
}

.uvq07-plt .bs button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em .8em;
  border-radius: .8em;
  font-size: .82em;
  font-weight: 700;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-plt .bs .wa {
  flex: 1;
  color: #fff;
  background: var(--c2);
}

.uvq07-plt .bs .wk {
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq07-plt .bs .wk:hover {
  background: color-mix(in srgb,var(--fg) 11%,transparent);
}

.uvq07-plt .bs button:hover {
  transform: translateY(-1px);
}

.uvq07-plt .bs button:active {
  transform: scale(.95);
}

.uvq07-plt .bs button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq07-plt {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: .85;
    transform: translateY(4.6em);
  }
}

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

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const st=el.querySelector(".st"),mb=el.querySelector(".mt b"),mi=el.querySelector(".mt i"),sp=parseFloat(getComputedStyle(el).getPropertyValue("--k"))||1;let tm=[],m=22,raf=0;
const count=to=>{cancelAnimationFrame(raf);mi.style.setProperty("--m",to+"%");const from=m,t0=performance.now(),d=1200/sp;const f=now=>{const p=Math.min(1,(now-t0)/d);m=Math.round(from+(to-from)*p);mb.textContent=m+" %";if(p<1)raf=requestAnimationFrame(f)};raf=requestAnimationFrame(f)};
const later=(f,ms)=>tm.push(setTimeout(f,ms/sp));
el.querySelector(".wa").addEventListener("click",()=>{el.classList.remove("wt");void el.offsetWidth;el.classList.add("wt");later(()=>{el.classList.add("ok");st.textContent=st.dataset.b;count(84)},700);later(()=>el.classList.remove("wt"),2300)});
el.querySelector(".wk").addEventListener("click",()=>{el.classList.remove("ok");st.textContent=st.dataset.a;count(22)});
return()=>{tm.forEach(clearTimeout);cancelAnimationFrame(raf)}
}

export default function CardPlantWater() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#c4643f",
          "--c2": "#3f8f5a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <article className="uvq07-plt"><div className="stg"><svg viewBox="0 0 120 130" aria-hidden="true"><defs><linearGradient id="uvq07-plt-g" x1="0" x2="1"><stop className="g1" offset="0" /><stop className="g2" offset=".45" /><stop className="g1" offset="1" /></linearGradient></defs><g className="lv"><g transform="translate(60 84) scale(0.8)"><g className="lf" style={{ "--r": "-52deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(1)"><g className="lf" style={{ "--r": "-24deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(1.14)"><g className="lf" style={{ "--r": "2deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(0.96)"><g className="lf" style={{ "--r": "27deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(0.78)"><g className="lf" style={{ "--r": "50deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g></g><path className="pb" d="M34 92h52l-6 32H40z" /><rect className="rm" x="29" y="83" width="62" height="11" rx="2.5" /><ellipse className="so" cx="60" cy="84" rx="27" ry="2.4" /></svg><span className="dp" aria-hidden="true"><i style={{ "--i": "0" } as CSSProperties}></i><i style={{ "--i": "1" } as CSSProperties}></i><i style={{ "--i": "2" } as CSSProperties}></i><i style={{ "--i": "3" } as CSSProperties}></i><i style={{ "--i": "4" } as CSSProperties}></i></span><span className="can" aria-hidden="true"><svg viewBox="0 0 32 24"><path d="M14 8h12v13H14z" fill="currentColor" /><path d="M14 11L4 5M2 3.5l4.5-.8.6 4.4zM26 10c4.5 0 4.5 8 0 8" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" /></svg></span></div><h3>Living room monstera</h3><p className="mt"><span>Soil moisture</span><b>22 %</b><i></i></p><p className="st" aria-live="polite" data-a="Needs water" data-b="Well watered">Needs water</p><div className="bs"><button type="button" className="wa">Water</button><button type="button" className="wk">Skip a week</button></div></article>
      </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 “Terracotta plant you can water” block (Cards) from AIMRAN Library to my project.

## What it is
A potted plant in terracotta: watering it drops water from the can, raises the soil moisture and lifts the drooping leaves.

## Chosen settings
- Main color: #c4643f
- Secondary color: #3f8f5a
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Monstera del salón"

## 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
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq07-plt {
  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;
  width: 16em;
  padding: 1em;
  border-radius: 1.5em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent),0 24px 48px -30px rgba(0,0,0,.45);
}

.uvq07-plt .stg {
  position: relative;
  display: grid;
  place-items: end center;
  height: 10.5em;
  overflow: hidden;
  border-radius: 1em;
  background: radial-gradient(80% 70% at 50% 35%,color-mix(in srgb,var(--c2) 16%,transparent),transparent 70%),color-mix(in srgb,var(--fg) 4%,transparent);
}

.uvq07-plt .stg>svg {
  width: 9em;
  height: 9.75em;
}

.uvq07-plt .g1 {
  stop-color: color-mix(in srgb,var(--c1) 75%,#000);
}

.uvq07-plt .g2 {
  stop-color: color-mix(in srgb,var(--c1) 85%,#fff);
}

.uvq07-plt .pb {
  fill: url(#uvq07-plt-g);
}

.uvq07-plt .rm {
  fill: color-mix(in srgb,var(--c1) 88%,#fff);
}

.uvq07-plt .so {
  fill: #4a3426;
}

.uvq07-plt .lf {
  transform: rotate(calc(var(--r) * 2 + 8deg)) scale(.9,.84);
  transition: transform calc(1.1s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq07-plt.ok .lf {
  transform: rotate(var(--r));
}

.uvq07-plt .sm {
  fill: none;
  stroke: color-mix(in srgb,var(--c2) 70%,#6b5a2a);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.uvq07-plt .lp {
  fill: color-mix(in srgb,var(--c2) 35%,#b39a48);
  transition: fill calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-plt.ok .lp {
  fill: var(--c2);
}

.uvq07-plt .vn {
  fill: none;
  stroke: rgba(255,255,255,.35);
  stroke-width: 1;
}

.uvq07-plt .dp {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.uvq07-plt .dp i {
  position: absolute;
  top: 2.2em;
  left: calc(51% + var(--i) * .38em);
  width: .3em;
  height: .42em;
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  background: #5ab4e5;
  opacity: 0;
}

.uvq07-plt.wt .dp i {
  animation: uvq07-plt calc(0.7s / var(--k)) ease-in 3 both;
  animation-delay: calc(var(--i) * calc(0.11s / var(--k)));
}

.uvq07-plt .can {
  position: absolute;
  right: 1em;
  top: .7em;
  width: 2.7em;
  color: #64748b;
  transform-origin: 30% 70%;
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq07-plt .can svg {
  display: block;
  width: 100%;
}

.uvq07-plt.wt .can {
  transform: rotate(-26deg) translateX(-.2em);
}

.uvq07-plt h3 {
  margin: .9em 0 0;
  font-size: 1em;
  font-weight: 700;
}

.uvq07-plt .mt {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35em;
  margin: .6em 0 .35em;
  font-size: .78em;
}

.uvq07-plt .mt span {
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq07-plt .mt b {
  font-variant-numeric: tabular-nums;
}

.uvq07-plt .mt i {
  grid-column: 1/-1;
  height: .45em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  overflow: hidden;
}

.uvq07-plt .mt i::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--m,22%);
  border-radius: inherit;
  background: linear-gradient(90deg,#5ab4e5,color-mix(in srgb,#5ab4e5 40%,var(--c2)));
  transition: width calc(1.2s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq07-plt .st {
  margin: 0;
  font-size: .78em;
  font-weight: 700;
  color: var(--c1);
}

.uvq07-plt.ok .st {
  color: var(--c2);
}

.uvq07-plt .bs {
  display: flex;
  gap: .5em;
  margin-top: .9em;
}

.uvq07-plt .bs button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em .8em;
  border-radius: .8em;
  font-size: .82em;
  font-weight: 700;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-plt .bs .wa {
  flex: 1;
  color: #fff;
  background: var(--c2);
}

.uvq07-plt .bs .wk {
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq07-plt .bs .wk:hover {
  background: color-mix(in srgb,var(--fg) 11%,transparent);
}

.uvq07-plt .bs button:hover {
  transform: translateY(-1px);
}

.uvq07-plt .bs button:active {
  transform: scale(.95);
}

.uvq07-plt .bs button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq07-plt {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: .85;
    transform: translateY(4.6em);
  }
}

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

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const st=el.querySelector(".st"),mb=el.querySelector(".mt b"),mi=el.querySelector(".mt i"),sp=parseFloat(getComputedStyle(el).getPropertyValue("--k"))||1;let tm=[],m=22,raf=0;
const count=to=>{cancelAnimationFrame(raf);mi.style.setProperty("--m",to+"%");const from=m,t0=performance.now(),d=1200/sp;const f=now=>{const p=Math.min(1,(now-t0)/d);m=Math.round(from+(to-from)*p);mb.textContent=m+" %";if(p<1)raf=requestAnimationFrame(f)};raf=requestAnimationFrame(f)};
const later=(f,ms)=>tm.push(setTimeout(f,ms/sp));
el.querySelector(".wa").addEventListener("click",()=>{el.classList.remove("wt");void el.offsetWidth;el.classList.add("wt");later(()=>{el.classList.add("ok");st.textContent=st.dataset.b;count(84)},700);later(()=>el.classList.remove("wt"),2300)});
el.querySelector(".wk").addEventListener("click",()=>{el.classList.remove("ok");st.textContent=st.dataset.a;count(22)});
return()=>{tm.forEach(clearTimeout);cancelAnimationFrame(raf)}
}

export default function CardPlantWater() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#c4643f",
          "--c2": "#3f8f5a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <article className="uvq07-plt"><div className="stg"><svg viewBox="0 0 120 130" aria-hidden="true"><defs><linearGradient id="uvq07-plt-g" x1="0" x2="1"><stop className="g1" offset="0" /><stop className="g2" offset=".45" /><stop className="g1" offset="1" /></linearGradient></defs><g className="lv"><g transform="translate(60 84) scale(0.8)"><g className="lf" style={{ "--r": "-52deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(1)"><g className="lf" style={{ "--r": "-24deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(1.14)"><g className="lf" style={{ "--r": "2deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(0.96)"><g className="lf" style={{ "--r": "27deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g><g transform="translate(60 84) scale(0.78)"><g className="lf" style={{ "--r": "50deg" } as CSSProperties}><path className="sm" d="M0 0Q-1-14 0-28" /><path className="lp" d="M0-28C-12-32-15-48-3-60C9-50 9-36 0-28Z" /><path className="vn" d="M0-29L-2.4-55" /></g></g></g><path className="pb" d="M34 92h52l-6 32H40z" /><rect className="rm" x="29" y="83" width="62" height="11" rx="2.5" /><ellipse className="so" cx="60" cy="84" rx="27" ry="2.4" /></svg><span className="dp" aria-hidden="true"><i style={{ "--i": "0" } as CSSProperties}></i><i style={{ "--i": "1" } as CSSProperties}></i><i style={{ "--i": "2" } as CSSProperties}></i><i style={{ "--i": "3" } as CSSProperties}></i><i style={{ "--i": "4" } as CSSProperties}></i></span><span className="can" aria-hidden="true"><svg viewBox="0 0 32 24"><path d="M14 8h12v13H14z" fill="currentColor" /><path d="M14 11L4 5M2 3.5l4.5-.8.6 4.4zM26 10c4.5 0 4.5 8 0 8" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" /></svg></span></div><h3>Living room monstera</h3><p className="mt"><span>Soil moisture</span><b>22 %</b><i></i></p><p className="st" aria-live="polite" data-a="Needs water" data-b="Well watered">Needs water</p><div className="bs"><button type="button" className="wa">Water</button><button type="button" className="wk">Skip a week</button></div></article>
      </div>
    </>
  );
}
```

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