# Log out with a door

> Approach and the door opens a crack with light behind it; log out and the figure walks in as the door shuts.

- Category: [Microinteractions](https://library.aimran.es/components/microinteractions)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-mi27-logout-door
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Logging out is usually a plain menu item, but it can also be a small farewell. Hovering or focusing the button opens the door a crack and warm light spills onto the floor; pressing it swings the door open, a little figure walks in and the door closes behind it with a thud. Logging back in plays the walk in reverse.

The main color is the wooden door and the secondary one the light inside. The scene is plain HTML and CSS with timed classes, so the timings are easy to adjust. Put it in account menus, kiosk apps or the last screen of a shared device.

## Code

### HTML

```html
<div class="uvq15-dor"><div class="sc" aria-hidden="true"><span class="fr"><span class="lt"></span><span class="lf"><i></i></span></span><span class="ps"><svg viewBox="0 0 20 40"><circle cx="10" cy="6" r="5"/><path d="M4 16a6 6 0 0 1 12 0v10h-3v12H7V26H4z"/></svg></span></div><p class="st"><b class="who">Lucía’s session</b><small class="ws">Signed in on this browser</small></p><button type="button" class="bt"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 17l5-5-5-5M15 12H3"/></svg><span class="lb">Sign out</span></button><p class="sr" aria-live="polite"></p></div>
```

### CSS

```css
.uvq15-dor {
  --c1: #9a3412;
  --c2: #fbbf24;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq15-dor {
  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;
  position: relative;
  border-radius: 1.3em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.4em 2.6em -1.8em rgba(0,0,0,.35);
  display: grid;
  justify-items: center;
  gap: .8em;
  width: 16em;
  padding: 1.1em;
}

.uvq15-dor .sc {
  position: relative;
  width: 100%;
  height: 8em;
  border-radius: .8em;
  overflow: hidden;
  background: linear-gradient(transparent calc(100% - .5em),color-mix(in srgb,var(--fg) 14%,transparent) 0),color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq15-dor .fr {
  position: absolute;
  left: 8.2em;
  bottom: .5em;
  width: 3.6em;
  height: 6.3em;
  box-sizing: border-box;
  border: .3em solid #3b2414;
  border-bottom: 0;
  border-radius: .3em .3em 0 0;
  background: #1c1008;
  perspective: 18em;
}

.uvq15-dor .lt {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 50% 100%,var(--c2),color-mix(in srgb,var(--c2) 40%,#1c1008) 60%,#1c1008);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .fr::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -.5em;
  width: 7em;
  height: .5em;
  margin-left: -3.5em;
  background: radial-gradient(50% 100% at 50% 0,color-mix(in srgb,var(--c2) 70%,transparent),transparent);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .lf {
  position: absolute;
  inset: 0;
  border-radius: .1em .1em 0 0;
  background: linear-gradient(90deg,rgba(0,0,0,.18),transparent 30%),repeating-linear-gradient(90deg,transparent 0 .55em,rgba(0,0,0,.08) .55em .6em),var(--c1);
  box-shadow: inset 0 0 0 .32em color-mix(in srgb,var(--c1) 80%,#000),inset 0 -2.6em 0 -2.28em color-mix(in srgb,var(--c1) 70%,#000);
  transform-origin: 0 50%;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq15-dor .lf i {
  position: absolute;
  right: .45em;
  top: 52%;
  width: .45em;
  height: .45em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#fef3c7,#ca8a04);
  box-shadow: 0 1px 1px rgba(0,0,0,.4);
}

.uvq15-dor .ps {
  position: absolute;
  left: 2em;
  bottom: .5em;
  width: 1.4em;
  height: 2.8em;
  color: var(--fg);
  transition: transform calc(1.1s / var(--k)) linear,opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
  transform-origin: 50% 100%;
}

.uvq15-dor .ps svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.uvq15-dor.mv .ps svg {
  animation: uvq15-dor-b calc(0.28s / var(--k)) ease-in-out infinite alternate;
}

@keyframes uvq15-dor-b {
  to {
    transform: translateY(-.18em) rotate(3deg);
  }
}

.uvq15-dor.peek .lf {
  transform: rotateY(-26deg);
}

.uvq15-dor.open .lf {
  transform: rotateY(-78deg);
  transition-timing-function: cubic-bezier(.22,1,.36,1);
}

.uvq15-dor.peek .lt,.uvq15-dor.open .lt {
  opacity: .6;
}

.uvq15-dor.open .lt,.uvq15-dor.open .fr::after {
  opacity: 1;
}

.uvq15-dor.walk .ps {
  transform: translateX(7.3em);
}

.uvq15-dor.in .ps {
  opacity: 0;
  scale: .8;
}

.uvq15-dor.thud .sc {
  animation: uvq15-dor-t calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@keyframes uvq15-dor-t {
  30% {
    transform: translateX(1.5px);
  }
  60% {
    transform: translateX(-1px);
  }
}

.uvq15-dor .st {
  display: grid;
  justify-items: center;
  margin: 0;
  text-align: center;
}

.uvq15-dor .who {
  font-size: .95em;
}

.uvq15-dor .ws {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq15-dor .bt {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  gap: .45em;
  padding: .7em 1.2em;
  border-radius: .8em;
  font-weight: 700;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform .15s cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .bt svg {
  width: 1.15em;
  height: 1.15em;
}

.uvq15-dor .bt:hover {
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq15-dor .bt:active {
  transform: scale(.96);
}

.uvq15-dor .bt:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq15-dor .bt:disabled {
  opacity: .5;
  cursor: default;
}

.uvq15-dor .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

### JavaScript

```js
document.querySelectorAll(".uvq15-dor").forEach(el => {
  const k=parseFloat(getComputedStyle(el).getPropertyValue("--k"))||1,rm=matchMedia("(prefers-reduced-motion:reduce)").matches;const bt=el.querySelector(".bt"),lb=el.querySelector(".lb"),who=el.querySelector(".who"),ws=el.querySelector(".ws"),sr=el.querySelector(".sr"),t0=lb.textContent;let out=false,tms=[];
const at=(fn,ms)=>{tms.push(setTimeout(fn,(rm?Math.min(ms,50):ms)/k))},cl=c=>el.classList,peek=v=>{if(!bt.disabled)cl().toggle("peek",v)};
["pointerenter","focus"].forEach(t=>bt.addEventListener(t,()=>peek(!out)));["pointerleave","blur"].forEach(t=>bt.addEventListener(t,()=>peek(false)));
const shut=()=>{cl().remove("open","peek","mv");cl().remove("thud");void el.offsetWidth;cl().add("thud")};
bt.addEventListener("click",()=>{bt.disabled=true;tms.forEach(t=>clearTimeout(t));tms=[];cl().add("open");
if(!out){at(()=>cl().add("walk","mv"),350);at(()=>{cl().add("in");cl().remove("mv")},1350);at(()=>{shut();out=true;who.textContent="Signed out";ws.textContent="See you soon";lb.textContent="Sign back in";sr.textContent="Signed out";bt.disabled=false;bt.focus()},1700)}
else{at(()=>cl().remove("in"),350);at(()=>{cl().remove("walk");cl().add("mv")},600);at(()=>{shut();out=false;who.textContent="Lucía’s session";ws.textContent="Signed in on this browser";lb.textContent=t0;sr.textContent="Signed in";bt.disabled=false;bt.focus()},1750)}});
return()=>tms.forEach(t=>clearTimeout(t))
});
```

### 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 = `
.uvq15-dor {
  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;
  position: relative;
  border-radius: 1.3em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.4em 2.6em -1.8em rgba(0,0,0,.35);
  display: grid;
  justify-items: center;
  gap: .8em;
  width: 16em;
  padding: 1.1em;
}

.uvq15-dor .sc {
  position: relative;
  width: 100%;
  height: 8em;
  border-radius: .8em;
  overflow: hidden;
  background: linear-gradient(transparent calc(100% - .5em),color-mix(in srgb,var(--fg) 14%,transparent) 0),color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq15-dor .fr {
  position: absolute;
  left: 8.2em;
  bottom: .5em;
  width: 3.6em;
  height: 6.3em;
  box-sizing: border-box;
  border: .3em solid #3b2414;
  border-bottom: 0;
  border-radius: .3em .3em 0 0;
  background: #1c1008;
  perspective: 18em;
}

.uvq15-dor .lt {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 50% 100%,var(--c2),color-mix(in srgb,var(--c2) 40%,#1c1008) 60%,#1c1008);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .fr::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -.5em;
  width: 7em;
  height: .5em;
  margin-left: -3.5em;
  background: radial-gradient(50% 100% at 50% 0,color-mix(in srgb,var(--c2) 70%,transparent),transparent);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .lf {
  position: absolute;
  inset: 0;
  border-radius: .1em .1em 0 0;
  background: linear-gradient(90deg,rgba(0,0,0,.18),transparent 30%),repeating-linear-gradient(90deg,transparent 0 .55em,rgba(0,0,0,.08) .55em .6em),var(--c1);
  box-shadow: inset 0 0 0 .32em color-mix(in srgb,var(--c1) 80%,#000),inset 0 -2.6em 0 -2.28em color-mix(in srgb,var(--c1) 70%,#000);
  transform-origin: 0 50%;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq15-dor .lf i {
  position: absolute;
  right: .45em;
  top: 52%;
  width: .45em;
  height: .45em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#fef3c7,#ca8a04);
  box-shadow: 0 1px 1px rgba(0,0,0,.4);
}

.uvq15-dor .ps {
  position: absolute;
  left: 2em;
  bottom: .5em;
  width: 1.4em;
  height: 2.8em;
  color: var(--fg);
  transition: transform calc(1.1s / var(--k)) linear,opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
  transform-origin: 50% 100%;
}

.uvq15-dor .ps svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.uvq15-dor.mv .ps svg {
  animation: uvq15-dor-b calc(0.28s / var(--k)) ease-in-out infinite alternate;
}

@keyframes uvq15-dor-b {
  to {
    transform: translateY(-.18em) rotate(3deg);
  }
}

.uvq15-dor.peek .lf {
  transform: rotateY(-26deg);
}

.uvq15-dor.open .lf {
  transform: rotateY(-78deg);
  transition-timing-function: cubic-bezier(.22,1,.36,1);
}

.uvq15-dor.peek .lt,.uvq15-dor.open .lt {
  opacity: .6;
}

.uvq15-dor.open .lt,.uvq15-dor.open .fr::after {
  opacity: 1;
}

.uvq15-dor.walk .ps {
  transform: translateX(7.3em);
}

.uvq15-dor.in .ps {
  opacity: 0;
  scale: .8;
}

.uvq15-dor.thud .sc {
  animation: uvq15-dor-t calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@keyframes uvq15-dor-t {
  30% {
    transform: translateX(1.5px);
  }
  60% {
    transform: translateX(-1px);
  }
}

.uvq15-dor .st {
  display: grid;
  justify-items: center;
  margin: 0;
  text-align: center;
}

.uvq15-dor .who {
  font-size: .95em;
}

.uvq15-dor .ws {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq15-dor .bt {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  gap: .45em;
  padding: .7em 1.2em;
  border-radius: .8em;
  font-weight: 700;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform .15s cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .bt svg {
  width: 1.15em;
  height: 1.15em;
}

.uvq15-dor .bt:hover {
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq15-dor .bt:active {
  transform: scale(.96);
}

.uvq15-dor .bt:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq15-dor .bt:disabled {
  opacity: .5;
  cursor: default;
}

.uvq15-dor .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion:reduce) {
  .uvq15-dor,.uvq15-dor *,.uvq15-dor *::before,.uvq15-dor *::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 k=parseFloat(getComputedStyle(el).getPropertyValue("--k"))||1,rm=matchMedia("(prefers-reduced-motion:reduce)").matches;const bt=el.querySelector(".bt"),lb=el.querySelector(".lb"),who=el.querySelector(".who"),ws=el.querySelector(".ws"),sr=el.querySelector(".sr"),t0=lb.textContent;let out=false,tms=[];
const at=(fn,ms)=>{tms.push(setTimeout(fn,(rm?Math.min(ms,50):ms)/k))},cl=c=>el.classList,peek=v=>{if(!bt.disabled)cl().toggle("peek",v)};
["pointerenter","focus"].forEach(t=>bt.addEventListener(t,()=>peek(!out)));["pointerleave","blur"].forEach(t=>bt.addEventListener(t,()=>peek(false)));
const shut=()=>{cl().remove("open","peek","mv");cl().remove("thud");void el.offsetWidth;cl().add("thud")};
bt.addEventListener("click",()=>{bt.disabled=true;tms.forEach(t=>clearTimeout(t));tms=[];cl().add("open");
if(!out){at(()=>cl().add("walk","mv"),350);at(()=>{cl().add("in");cl().remove("mv")},1350);at(()=>{shut();out=true;who.textContent="Signed out";ws.textContent="See you soon";lb.textContent="Sign back in";sr.textContent="Signed out";bt.disabled=false;bt.focus()},1700)}
else{at(()=>cl().remove("in"),350);at(()=>{cl().remove("walk");cl().add("mv")},600);at(()=>{shut();out=false;who.textContent="Lucía’s session";ws.textContent="Signed in on this browser";lb.textContent=t0;sr.textContent="Signed in";bt.disabled=false;bt.focus()},1750)}});
return()=>tms.forEach(t=>clearTimeout(t))
}

export default function Mi27LogoutDoor() {
  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": "#9a3412",
          "--c2": "#fbbf24",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq15-dor"><div className="sc" aria-hidden="true"><span className="fr"><span className="lt"></span><span className="lf"><i></i></span></span><span className="ps"><svg viewBox="0 0 20 40"><circle cx="10" cy="6" r="5" /><path d="M4 16a6 6 0 0 1 12 0v10h-3v12H7V26H4z" /></svg></span></div><p className="st"><b className="who">Lucía’s session</b><small className="ws">Signed in on this browser</small></p><button type="button" className="bt"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 17l5-5-5-5M15 12H3" /></svg><span className="lb">Sign out</span></button><p className="sr" aria-live="polite"></p></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 “Log out with a door” block (Microinteractions) from AIMRAN Library to my project.

## What it is
Approach and the door opens a crack with light behind it; log out and the figure walks in as the door shuts.

## Chosen settings
- Main color: #9a3412
- Secondary color: #fbbf24
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Cerrar sesió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 = `
.uvq15-dor {
  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;
  position: relative;
  border-radius: 1.3em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.4em 2.6em -1.8em rgba(0,0,0,.35);
  display: grid;
  justify-items: center;
  gap: .8em;
  width: 16em;
  padding: 1.1em;
}

.uvq15-dor .sc {
  position: relative;
  width: 100%;
  height: 8em;
  border-radius: .8em;
  overflow: hidden;
  background: linear-gradient(transparent calc(100% - .5em),color-mix(in srgb,var(--fg) 14%,transparent) 0),color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq15-dor .fr {
  position: absolute;
  left: 8.2em;
  bottom: .5em;
  width: 3.6em;
  height: 6.3em;
  box-sizing: border-box;
  border: .3em solid #3b2414;
  border-bottom: 0;
  border-radius: .3em .3em 0 0;
  background: #1c1008;
  perspective: 18em;
}

.uvq15-dor .lt {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 50% 100%,var(--c2),color-mix(in srgb,var(--c2) 40%,#1c1008) 60%,#1c1008);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .fr::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -.5em;
  width: 7em;
  height: .5em;
  margin-left: -3.5em;
  background: radial-gradient(50% 100% at 50% 0,color-mix(in srgb,var(--c2) 70%,transparent),transparent);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .lf {
  position: absolute;
  inset: 0;
  border-radius: .1em .1em 0 0;
  background: linear-gradient(90deg,rgba(0,0,0,.18),transparent 30%),repeating-linear-gradient(90deg,transparent 0 .55em,rgba(0,0,0,.08) .55em .6em),var(--c1);
  box-shadow: inset 0 0 0 .32em color-mix(in srgb,var(--c1) 80%,#000),inset 0 -2.6em 0 -2.28em color-mix(in srgb,var(--c1) 70%,#000);
  transform-origin: 0 50%;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq15-dor .lf i {
  position: absolute;
  right: .45em;
  top: 52%;
  width: .45em;
  height: .45em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#fef3c7,#ca8a04);
  box-shadow: 0 1px 1px rgba(0,0,0,.4);
}

.uvq15-dor .ps {
  position: absolute;
  left: 2em;
  bottom: .5em;
  width: 1.4em;
  height: 2.8em;
  color: var(--fg);
  transition: transform calc(1.1s / var(--k)) linear,opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
  transform-origin: 50% 100%;
}

.uvq15-dor .ps svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.uvq15-dor.mv .ps svg {
  animation: uvq15-dor-b calc(0.28s / var(--k)) ease-in-out infinite alternate;
}

@keyframes uvq15-dor-b {
  to {
    transform: translateY(-.18em) rotate(3deg);
  }
}

.uvq15-dor.peek .lf {
  transform: rotateY(-26deg);
}

.uvq15-dor.open .lf {
  transform: rotateY(-78deg);
  transition-timing-function: cubic-bezier(.22,1,.36,1);
}

.uvq15-dor.peek .lt,.uvq15-dor.open .lt {
  opacity: .6;
}

.uvq15-dor.open .lt,.uvq15-dor.open .fr::after {
  opacity: 1;
}

.uvq15-dor.walk .ps {
  transform: translateX(7.3em);
}

.uvq15-dor.in .ps {
  opacity: 0;
  scale: .8;
}

.uvq15-dor.thud .sc {
  animation: uvq15-dor-t calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@keyframes uvq15-dor-t {
  30% {
    transform: translateX(1.5px);
  }
  60% {
    transform: translateX(-1px);
  }
}

.uvq15-dor .st {
  display: grid;
  justify-items: center;
  margin: 0;
  text-align: center;
}

.uvq15-dor .who {
  font-size: .95em;
}

.uvq15-dor .ws {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq15-dor .bt {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  gap: .45em;
  padding: .7em 1.2em;
  border-radius: .8em;
  font-weight: 700;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform .15s cubic-bezier(.25,.1,.25,1);
}

.uvq15-dor .bt svg {
  width: 1.15em;
  height: 1.15em;
}

.uvq15-dor .bt:hover {
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq15-dor .bt:active {
  transform: scale(.96);
}

.uvq15-dor .bt:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq15-dor .bt:disabled {
  opacity: .5;
  cursor: default;
}

.uvq15-dor .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion:reduce) {
  .uvq15-dor,.uvq15-dor *,.uvq15-dor *::before,.uvq15-dor *::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 k=parseFloat(getComputedStyle(el).getPropertyValue("--k"))||1,rm=matchMedia("(prefers-reduced-motion:reduce)").matches;const bt=el.querySelector(".bt"),lb=el.querySelector(".lb"),who=el.querySelector(".who"),ws=el.querySelector(".ws"),sr=el.querySelector(".sr"),t0=lb.textContent;let out=false,tms=[];
const at=(fn,ms)=>{tms.push(setTimeout(fn,(rm?Math.min(ms,50):ms)/k))},cl=c=>el.classList,peek=v=>{if(!bt.disabled)cl().toggle("peek",v)};
["pointerenter","focus"].forEach(t=>bt.addEventListener(t,()=>peek(!out)));["pointerleave","blur"].forEach(t=>bt.addEventListener(t,()=>peek(false)));
const shut=()=>{cl().remove("open","peek","mv");cl().remove("thud");void el.offsetWidth;cl().add("thud")};
bt.addEventListener("click",()=>{bt.disabled=true;tms.forEach(t=>clearTimeout(t));tms=[];cl().add("open");
if(!out){at(()=>cl().add("walk","mv"),350);at(()=>{cl().add("in");cl().remove("mv")},1350);at(()=>{shut();out=true;who.textContent="Signed out";ws.textContent="See you soon";lb.textContent="Sign back in";sr.textContent="Signed out";bt.disabled=false;bt.focus()},1700)}
else{at(()=>cl().remove("in"),350);at(()=>{cl().remove("walk");cl().add("mv")},600);at(()=>{shut();out=false;who.textContent="Lucía’s session";ws.textContent="Signed in on this browser";lb.textContent=t0;sr.textContent="Signed in";bt.disabled=false;bt.focus()},1750)}});
return()=>tms.forEach(t=>clearTimeout(t))
}

export default function Mi27LogoutDoor() {
  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": "#9a3412",
          "--c2": "#fbbf24",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq15-dor"><div className="sc" aria-hidden="true"><span className="fr"><span className="lt"></span><span className="lf"><i></i></span></span><span className="ps"><svg viewBox="0 0 20 40"><circle cx="10" cy="6" r="5" /><path d="M4 16a6 6 0 0 1 12 0v10h-3v12H7V26H4z" /></svg></span></div><p className="st"><b className="who">Lucía’s session</b><small className="ws">Signed in on this browser</small></p><button type="button" className="bt"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 17l5-5-5-5M15 12H3" /></svg><span className="lb">Sign out</span></button><p className="sr" aria-live="polite"></p></div>
      </div>
    </>
  );
}
```

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