# Railway clock time input

> A time field next to a station clock: the hands spring round when the time changes and the red second hand pauses each minute.

- Category: [Inputs](https://library.aimran.es/components/inputs)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-in-station-clock
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A native time input paired with a railway station clock drawn in CSS: sixty ticks, black bar hands and the red paddle second hand that sweeps for fifty-eight seconds and pauses at the top. Typing a time, or tapping Now, plus fifteen minutes or plus one hour, turns the hands with a springy ease and always the short way round.

The main color paints the second hand and the second color the hands and ticks, so a navy or brass version takes seconds. Use it for departure times, pickup slots and reminders, where seeing the hour on a dial is quicker than reading digits.

## Code

### HTML

```html
<div class="uvq06-ck"><div class="fc" aria-hidden="true"><b style="--a:0deg" class="hr"></b><b style="--a:6deg"></b><b style="--a:12deg"></b><b style="--a:18deg"></b><b style="--a:24deg"></b><b style="--a:30deg" class="hr"></b><b style="--a:36deg"></b><b style="--a:42deg"></b><b style="--a:48deg"></b><b style="--a:54deg"></b><b style="--a:60deg" class="hr"></b><b style="--a:66deg"></b><b style="--a:72deg"></b><b style="--a:78deg"></b><b style="--a:84deg"></b><b style="--a:90deg" class="hr"></b><b style="--a:96deg"></b><b style="--a:102deg"></b><b style="--a:108deg"></b><b style="--a:114deg"></b><b style="--a:120deg" class="hr"></b><b style="--a:126deg"></b><b style="--a:132deg"></b><b style="--a:138deg"></b><b style="--a:144deg"></b><b style="--a:150deg" class="hr"></b><b style="--a:156deg"></b><b style="--a:162deg"></b><b style="--a:168deg"></b><b style="--a:174deg"></b><b style="--a:180deg" class="hr"></b><b style="--a:186deg"></b><b style="--a:192deg"></b><b style="--a:198deg"></b><b style="--a:204deg"></b><b style="--a:210deg" class="hr"></b><b style="--a:216deg"></b><b style="--a:222deg"></b><b style="--a:228deg"></b><b style="--a:234deg"></b><b style="--a:240deg" class="hr"></b><b style="--a:246deg"></b><b style="--a:252deg"></b><b style="--a:258deg"></b><b style="--a:264deg"></b><b style="--a:270deg" class="hr"></b><b style="--a:276deg"></b><b style="--a:282deg"></b><b style="--a:288deg"></b><b style="--a:294deg"></b><b style="--a:300deg" class="hr"></b><b style="--a:306deg"></b><b style="--a:312deg"></b><b style="--a:318deg"></b><b style="--a:324deg"></b><b style="--a:330deg" class="hr"></b><b style="--a:336deg"></b><b style="--a:342deg"></b><b style="--a:348deg"></b><b style="--a:354deg"></b><i class="h"></i><i class="m"></i><i class="s"></i><i class="ct"></i></div><div class="sd"><label for="uvq06-ck-in">Departure time</label><input id="uvq06-ck-in" type="time" step="300"><div class="ch"><button type="button" data-a="0">Now</button><button type="button" data-a="15">+15 min</button><button type="button" data-a="60">+1 h</button></div></div></div>
```

### CSS

```css
.uvq06-ck {
  --c1: #dc2626;
  --c2: #111827;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq06-ck {
  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;
  display: flex;
  align-items: center;
  gap: 1.3em;
  width: 20em;
}

.uvq06-ck .fc {
  position: relative;
  flex: none;
  width: 8em;
  height: 8em;
  border-radius: 50%;
  background: radial-gradient(circle,#fff 62%,#eceef1);
  box-shadow: 0 0 0 .38em #2a2c30,0 0 0 .46em #5a5e64,0 1em 1.6em -.6em rgba(0,0,0,.6);
}

.uvq06-ck .fc b {
  position: absolute;
  left: 49%;
  top: 4%;
  width: 2%;
  height: 5%;
  background: var(--c2);
  transform-origin: 50% 920%;
  transform: rotate(var(--a));
}

.uvq06-ck .fc b.hr {
  left: 47.75%;
  width: 4.5%;
  height: 13%;
  transform-origin: 50% 353.85%;
}

.uvq06-ck .h,.uvq06-ck .m,.uvq06-ck .s,.uvq06-ck .ct {
  position: absolute;
  background: var(--c2);
}

.uvq06-ck .h,.uvq06-ck .m {
  rotate: var(--r,0deg);
  transition: rotate calc(0.9s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-ck .h {
  left: 46.75%;
  top: 22%;
  width: 6.5%;
  height: 36%;
  transform-origin: 50% 77.78%;
}

.uvq06-ck .m {
  left: 47.5%;
  top: 7%;
  width: 5%;
  height: 51%;
  transform-origin: 50% 84.31%;
}

.uvq06-ck .s {
  left: 49.4%;
  top: 16%;
  width: 1.2%;
  height: 52%;
  transform-origin: 50% 65.38%;
  background: var(--c1);
  animation: uvq06-ck calc(60s / var(--k)) linear infinite;
}

.uvq06-ck .s::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5%;
  width: 850%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: inherit;
  translate: -50% 0;
}

.uvq06-ck .ct {
  left: 47%;
  top: 47%;
  width: 6%;
  height: 6%;
  border-radius: 50%;
}

.uvq06-ck .sd {
  flex: 1;
  min-width: 0;
}

.uvq06-ck label {
  display: block;
  margin: 0 0 .45em;
  font-size: .82em;
  font-weight: 650;
}

.uvq06-ck input {
  box-sizing: border-box;
  width: 100%;
  height: 2.3em;
  margin: 0;
  padding: 0 .55em;
  border: 0;
  border-radius: .75em;
  outline: 0;
  font: inherit;
  font-size: 1.25em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
  transition: box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-ck input:focus {
  box-shadow: 0 0 0 2px var(--c1),0 0 0 6px color-mix(in srgb,var(--c1) 18%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
}

.uvq06-ck input::-webkit-calendar-picker-indicator {
  opacity: .55;
  cursor: pointer;
}

.uvq06-ck .ch {
  display: flex;
  flex-wrap: wrap;
  gap: .35em;
  margin-top: .65em;
}

.uvq06-ck .ch button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .42em .7em;
  border-radius: 2em;
  font-size: .75em;
  font-weight: 650;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-ck .ch button:hover {
  background: color-mix(in srgb,var(--c1) 14%,transparent);
}

.uvq06-ck .ch button:active {
  transform: scale(.92);
}

.uvq06-ck .ch button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq06-ck {
  0% {
    rotate: 0deg;
  }
  96.6%,100% {
    rotate: 360deg;
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq06-ck").forEach(el => {
  const i=el.querySelector("input"),h=el.querySelector(".h"),m=el.querySelector(".m"),s=el.querySelector(".s");let rh=0,rm=0;
const near=(p,t)=>p+((t-p)%360+540)%360-180;
const hm=()=>{const[H,M]=(i.value||"00:00").split(":").map(Number);return[H||0,M||0]};
const draw=()=>{const[H,M]=hm();rh=near(rh,(H%12)*30+M/2);rm=near(rm,M*6);h.style.setProperty("--r",rh+"deg");m.style.setProperty("--r",rm+"deg")};
const set=x=>{x=(x%1440+1440)%1440;i.value=String(Math.floor(x/60)).padStart(2,"0")+":"+String(x%60).padStart(2,"0");draw()};
const now=()=>{const d=new Date();return d.getHours()*60+Math.round(d.getMinutes()/5)*5};
el.querySelectorAll("[data-a]").forEach(b=>b.addEventListener("click",()=>{const a=+b.dataset.a,[H,M]=hm();set(a?H*60+M+a:now())}));
i.addEventListener("input",draw);s.style.animationDelay=-new Date().getSeconds()+"s";set(now())
});
```

### 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 = `
.uvq06-ck {
  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;
  display: flex;
  align-items: center;
  gap: 1.3em;
  width: 20em;
}

.uvq06-ck .fc {
  position: relative;
  flex: none;
  width: 8em;
  height: 8em;
  border-radius: 50%;
  background: radial-gradient(circle,#fff 62%,#eceef1);
  box-shadow: 0 0 0 .38em #2a2c30,0 0 0 .46em #5a5e64,0 1em 1.6em -.6em rgba(0,0,0,.6);
}

.uvq06-ck .fc b {
  position: absolute;
  left: 49%;
  top: 4%;
  width: 2%;
  height: 5%;
  background: var(--c2);
  transform-origin: 50% 920%;
  transform: rotate(var(--a));
}

.uvq06-ck .fc b.hr {
  left: 47.75%;
  width: 4.5%;
  height: 13%;
  transform-origin: 50% 353.85%;
}

.uvq06-ck .h,.uvq06-ck .m,.uvq06-ck .s,.uvq06-ck .ct {
  position: absolute;
  background: var(--c2);
}

.uvq06-ck .h,.uvq06-ck .m {
  rotate: var(--r,0deg);
  transition: rotate calc(0.9s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-ck .h {
  left: 46.75%;
  top: 22%;
  width: 6.5%;
  height: 36%;
  transform-origin: 50% 77.78%;
}

.uvq06-ck .m {
  left: 47.5%;
  top: 7%;
  width: 5%;
  height: 51%;
  transform-origin: 50% 84.31%;
}

.uvq06-ck .s {
  left: 49.4%;
  top: 16%;
  width: 1.2%;
  height: 52%;
  transform-origin: 50% 65.38%;
  background: var(--c1);
  animation: uvq06-ck calc(60s / var(--k)) linear infinite;
}

.uvq06-ck .s::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5%;
  width: 850%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: inherit;
  translate: -50% 0;
}

.uvq06-ck .ct {
  left: 47%;
  top: 47%;
  width: 6%;
  height: 6%;
  border-radius: 50%;
}

.uvq06-ck .sd {
  flex: 1;
  min-width: 0;
}

.uvq06-ck label {
  display: block;
  margin: 0 0 .45em;
  font-size: .82em;
  font-weight: 650;
}

.uvq06-ck input {
  box-sizing: border-box;
  width: 100%;
  height: 2.3em;
  margin: 0;
  padding: 0 .55em;
  border: 0;
  border-radius: .75em;
  outline: 0;
  font: inherit;
  font-size: 1.25em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
  transition: box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-ck input:focus {
  box-shadow: 0 0 0 2px var(--c1),0 0 0 6px color-mix(in srgb,var(--c1) 18%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
}

.uvq06-ck input::-webkit-calendar-picker-indicator {
  opacity: .55;
  cursor: pointer;
}

.uvq06-ck .ch {
  display: flex;
  flex-wrap: wrap;
  gap: .35em;
  margin-top: .65em;
}

.uvq06-ck .ch button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .42em .7em;
  border-radius: 2em;
  font-size: .75em;
  font-weight: 650;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-ck .ch button:hover {
  background: color-mix(in srgb,var(--c1) 14%,transparent);
}

.uvq06-ck .ch button:active {
  transform: scale(.92);
}

.uvq06-ck .ch button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq06-ck {
  0% {
    rotate: 0deg;
  }
  96.6%,100% {
    rotate: 360deg;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq06-ck,.uvq06-ck *,.uvq06-ck *::before,.uvq06-ck *::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 i=el.querySelector("input"),h=el.querySelector(".h"),m=el.querySelector(".m"),s=el.querySelector(".s");let rh=0,rm=0;
const near=(p,t)=>p+((t-p)%360+540)%360-180;
const hm=()=>{const[H,M]=(i.value||"00:00").split(":").map(Number);return[H||0,M||0]};
const draw=()=>{const[H,M]=hm();rh=near(rh,(H%12)*30+M/2);rm=near(rm,M*6);h.style.setProperty("--r",rh+"deg");m.style.setProperty("--r",rm+"deg")};
const set=x=>{x=(x%1440+1440)%1440;i.value=String(Math.floor(x/60)).padStart(2,"0")+":"+String(x%60).padStart(2,"0");draw()};
const now=()=>{const d=new Date();return d.getHours()*60+Math.round(d.getMinutes()/5)*5};
el.querySelectorAll("[data-a]").forEach(b=>b.addEventListener("click",()=>{const a=+b.dataset.a,[H,M]=hm();set(a?H*60+M+a:now())}));
i.addEventListener("input",draw);s.style.animationDelay=-new Date().getSeconds()+"s";set(now())
}

export default function InStationClock() {
  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": "#dc2626",
          "--c2": "#111827",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq06-ck"><div className="fc" aria-hidden="true"><b style={{ "--a": "0deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "6deg" } as CSSProperties}></b><b style={{ "--a": "12deg" } as CSSProperties}></b><b style={{ "--a": "18deg" } as CSSProperties}></b><b style={{ "--a": "24deg" } as CSSProperties}></b><b style={{ "--a": "30deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "36deg" } as CSSProperties}></b><b style={{ "--a": "42deg" } as CSSProperties}></b><b style={{ "--a": "48deg" } as CSSProperties}></b><b style={{ "--a": "54deg" } as CSSProperties}></b><b style={{ "--a": "60deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "66deg" } as CSSProperties}></b><b style={{ "--a": "72deg" } as CSSProperties}></b><b style={{ "--a": "78deg" } as CSSProperties}></b><b style={{ "--a": "84deg" } as CSSProperties}></b><b style={{ "--a": "90deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "96deg" } as CSSProperties}></b><b style={{ "--a": "102deg" } as CSSProperties}></b><b style={{ "--a": "108deg" } as CSSProperties}></b><b style={{ "--a": "114deg" } as CSSProperties}></b><b style={{ "--a": "120deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "126deg" } as CSSProperties}></b><b style={{ "--a": "132deg" } as CSSProperties}></b><b style={{ "--a": "138deg" } as CSSProperties}></b><b style={{ "--a": "144deg" } as CSSProperties}></b><b style={{ "--a": "150deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "156deg" } as CSSProperties}></b><b style={{ "--a": "162deg" } as CSSProperties}></b><b style={{ "--a": "168deg" } as CSSProperties}></b><b style={{ "--a": "174deg" } as CSSProperties}></b><b style={{ "--a": "180deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "186deg" } as CSSProperties}></b><b style={{ "--a": "192deg" } as CSSProperties}></b><b style={{ "--a": "198deg" } as CSSProperties}></b><b style={{ "--a": "204deg" } as CSSProperties}></b><b style={{ "--a": "210deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "216deg" } as CSSProperties}></b><b style={{ "--a": "222deg" } as CSSProperties}></b><b style={{ "--a": "228deg" } as CSSProperties}></b><b style={{ "--a": "234deg" } as CSSProperties}></b><b style={{ "--a": "240deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "246deg" } as CSSProperties}></b><b style={{ "--a": "252deg" } as CSSProperties}></b><b style={{ "--a": "258deg" } as CSSProperties}></b><b style={{ "--a": "264deg" } as CSSProperties}></b><b style={{ "--a": "270deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "276deg" } as CSSProperties}></b><b style={{ "--a": "282deg" } as CSSProperties}></b><b style={{ "--a": "288deg" } as CSSProperties}></b><b style={{ "--a": "294deg" } as CSSProperties}></b><b style={{ "--a": "300deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "306deg" } as CSSProperties}></b><b style={{ "--a": "312deg" } as CSSProperties}></b><b style={{ "--a": "318deg" } as CSSProperties}></b><b style={{ "--a": "324deg" } as CSSProperties}></b><b style={{ "--a": "330deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "336deg" } as CSSProperties}></b><b style={{ "--a": "342deg" } as CSSProperties}></b><b style={{ "--a": "348deg" } as CSSProperties}></b><b style={{ "--a": "354deg" } as CSSProperties}></b><i className="h"></i><i className="m"></i><i className="s"></i><i className="ct"></i></div><div className="sd"><label htmlFor="uvq06-ck-in">Departure time</label><input id="uvq06-ck-in" type="time" step="300" /><div className="ch"><button type="button" data-a="0">Now</button><button type="button" data-a="15">+15 min</button><button type="button" data-a="60">+1 h</button></div></div></div>
      </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 “Railway clock time input” block (Inputs) from AIMRAN Library to my project.

## What it is
A time field next to a station clock: the hands spring round when the time changes and the red second hand pauses each minute.

## Chosen settings
- Main color: #dc2626
- Secondary color: #111827
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Hora de salida"

## 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 = `
.uvq06-ck {
  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;
  display: flex;
  align-items: center;
  gap: 1.3em;
  width: 20em;
}

.uvq06-ck .fc {
  position: relative;
  flex: none;
  width: 8em;
  height: 8em;
  border-radius: 50%;
  background: radial-gradient(circle,#fff 62%,#eceef1);
  box-shadow: 0 0 0 .38em #2a2c30,0 0 0 .46em #5a5e64,0 1em 1.6em -.6em rgba(0,0,0,.6);
}

.uvq06-ck .fc b {
  position: absolute;
  left: 49%;
  top: 4%;
  width: 2%;
  height: 5%;
  background: var(--c2);
  transform-origin: 50% 920%;
  transform: rotate(var(--a));
}

.uvq06-ck .fc b.hr {
  left: 47.75%;
  width: 4.5%;
  height: 13%;
  transform-origin: 50% 353.85%;
}

.uvq06-ck .h,.uvq06-ck .m,.uvq06-ck .s,.uvq06-ck .ct {
  position: absolute;
  background: var(--c2);
}

.uvq06-ck .h,.uvq06-ck .m {
  rotate: var(--r,0deg);
  transition: rotate calc(0.9s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-ck .h {
  left: 46.75%;
  top: 22%;
  width: 6.5%;
  height: 36%;
  transform-origin: 50% 77.78%;
}

.uvq06-ck .m {
  left: 47.5%;
  top: 7%;
  width: 5%;
  height: 51%;
  transform-origin: 50% 84.31%;
}

.uvq06-ck .s {
  left: 49.4%;
  top: 16%;
  width: 1.2%;
  height: 52%;
  transform-origin: 50% 65.38%;
  background: var(--c1);
  animation: uvq06-ck calc(60s / var(--k)) linear infinite;
}

.uvq06-ck .s::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5%;
  width: 850%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: inherit;
  translate: -50% 0;
}

.uvq06-ck .ct {
  left: 47%;
  top: 47%;
  width: 6%;
  height: 6%;
  border-radius: 50%;
}

.uvq06-ck .sd {
  flex: 1;
  min-width: 0;
}

.uvq06-ck label {
  display: block;
  margin: 0 0 .45em;
  font-size: .82em;
  font-weight: 650;
}

.uvq06-ck input {
  box-sizing: border-box;
  width: 100%;
  height: 2.3em;
  margin: 0;
  padding: 0 .55em;
  border: 0;
  border-radius: .75em;
  outline: 0;
  font: inherit;
  font-size: 1.25em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
  transition: box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-ck input:focus {
  box-shadow: 0 0 0 2px var(--c1),0 0 0 6px color-mix(in srgb,var(--c1) 18%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
}

.uvq06-ck input::-webkit-calendar-picker-indicator {
  opacity: .55;
  cursor: pointer;
}

.uvq06-ck .ch {
  display: flex;
  flex-wrap: wrap;
  gap: .35em;
  margin-top: .65em;
}

.uvq06-ck .ch button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .42em .7em;
  border-radius: 2em;
  font-size: .75em;
  font-weight: 650;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-ck .ch button:hover {
  background: color-mix(in srgb,var(--c1) 14%,transparent);
}

.uvq06-ck .ch button:active {
  transform: scale(.92);
}

.uvq06-ck .ch button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq06-ck {
  0% {
    rotate: 0deg;
  }
  96.6%,100% {
    rotate: 360deg;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq06-ck,.uvq06-ck *,.uvq06-ck *::before,.uvq06-ck *::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 i=el.querySelector("input"),h=el.querySelector(".h"),m=el.querySelector(".m"),s=el.querySelector(".s");let rh=0,rm=0;
const near=(p,t)=>p+((t-p)%360+540)%360-180;
const hm=()=>{const[H,M]=(i.value||"00:00").split(":").map(Number);return[H||0,M||0]};
const draw=()=>{const[H,M]=hm();rh=near(rh,(H%12)*30+M/2);rm=near(rm,M*6);h.style.setProperty("--r",rh+"deg");m.style.setProperty("--r",rm+"deg")};
const set=x=>{x=(x%1440+1440)%1440;i.value=String(Math.floor(x/60)).padStart(2,"0")+":"+String(x%60).padStart(2,"0");draw()};
const now=()=>{const d=new Date();return d.getHours()*60+Math.round(d.getMinutes()/5)*5};
el.querySelectorAll("[data-a]").forEach(b=>b.addEventListener("click",()=>{const a=+b.dataset.a,[H,M]=hm();set(a?H*60+M+a:now())}));
i.addEventListener("input",draw);s.style.animationDelay=-new Date().getSeconds()+"s";set(now())
}

export default function InStationClock() {
  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": "#dc2626",
          "--c2": "#111827",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq06-ck"><div className="fc" aria-hidden="true"><b style={{ "--a": "0deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "6deg" } as CSSProperties}></b><b style={{ "--a": "12deg" } as CSSProperties}></b><b style={{ "--a": "18deg" } as CSSProperties}></b><b style={{ "--a": "24deg" } as CSSProperties}></b><b style={{ "--a": "30deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "36deg" } as CSSProperties}></b><b style={{ "--a": "42deg" } as CSSProperties}></b><b style={{ "--a": "48deg" } as CSSProperties}></b><b style={{ "--a": "54deg" } as CSSProperties}></b><b style={{ "--a": "60deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "66deg" } as CSSProperties}></b><b style={{ "--a": "72deg" } as CSSProperties}></b><b style={{ "--a": "78deg" } as CSSProperties}></b><b style={{ "--a": "84deg" } as CSSProperties}></b><b style={{ "--a": "90deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "96deg" } as CSSProperties}></b><b style={{ "--a": "102deg" } as CSSProperties}></b><b style={{ "--a": "108deg" } as CSSProperties}></b><b style={{ "--a": "114deg" } as CSSProperties}></b><b style={{ "--a": "120deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "126deg" } as CSSProperties}></b><b style={{ "--a": "132deg" } as CSSProperties}></b><b style={{ "--a": "138deg" } as CSSProperties}></b><b style={{ "--a": "144deg" } as CSSProperties}></b><b style={{ "--a": "150deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "156deg" } as CSSProperties}></b><b style={{ "--a": "162deg" } as CSSProperties}></b><b style={{ "--a": "168deg" } as CSSProperties}></b><b style={{ "--a": "174deg" } as CSSProperties}></b><b style={{ "--a": "180deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "186deg" } as CSSProperties}></b><b style={{ "--a": "192deg" } as CSSProperties}></b><b style={{ "--a": "198deg" } as CSSProperties}></b><b style={{ "--a": "204deg" } as CSSProperties}></b><b style={{ "--a": "210deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "216deg" } as CSSProperties}></b><b style={{ "--a": "222deg" } as CSSProperties}></b><b style={{ "--a": "228deg" } as CSSProperties}></b><b style={{ "--a": "234deg" } as CSSProperties}></b><b style={{ "--a": "240deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "246deg" } as CSSProperties}></b><b style={{ "--a": "252deg" } as CSSProperties}></b><b style={{ "--a": "258deg" } as CSSProperties}></b><b style={{ "--a": "264deg" } as CSSProperties}></b><b style={{ "--a": "270deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "276deg" } as CSSProperties}></b><b style={{ "--a": "282deg" } as CSSProperties}></b><b style={{ "--a": "288deg" } as CSSProperties}></b><b style={{ "--a": "294deg" } as CSSProperties}></b><b style={{ "--a": "300deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "306deg" } as CSSProperties}></b><b style={{ "--a": "312deg" } as CSSProperties}></b><b style={{ "--a": "318deg" } as CSSProperties}></b><b style={{ "--a": "324deg" } as CSSProperties}></b><b style={{ "--a": "330deg" } as CSSProperties} className="hr"></b><b style={{ "--a": "336deg" } as CSSProperties}></b><b style={{ "--a": "342deg" } as CSSProperties}></b><b style={{ "--a": "348deg" } as CSSProperties}></b><b style={{ "--a": "354deg" } as CSSProperties}></b><i className="h"></i><i className="m"></i><i className="s"></i><i className="ct"></i></div><div className="sd"><label htmlFor="uvq06-ck-in">Departure time</label><input id="uvq06-ck-in" type="time" step="300" /><div className="ch"><button type="button" data-a="0">Now</button><button type="button" data-a="15">+15 min</button><button type="button" data-a="60">+1 h</button></div></div></div>
      </div>
    </>
  );
}
```

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