# Theater curtain modal

> A velvet curtain closes over the page and opens again to present the ticket for the premiere.

- Category: [Overlays](https://library.aimran.es/components/overlays)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-ov-theater-curtain
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Some announcements deserve a bit of ceremony, and this modal stages one. A scalloped valance drops, two pleated velvet curtains draw across the page with a gold fringe, then part and gather to the sides while a program card rises under a spotlight. Closing draws the curtains again before they leave. It fits theaters, cinemas, launches, award nights and festival pages.

The main color is the velvet and the second one the gold trim, and the text field holds the title of the show. Escape, the backdrop and both buttons run the closing sequence and give focus back to the button that opened it.

## Code

### HTML

```html
<div class="uvq13-tel"><div class="pg" aria-hidden="true"><i class="h"></i><i></i><i></i><i></i><i></i><i class="s"></i></div><button type="button" class="fire" aria-haspopup="dialog">See the premiere</button><div class="scr"></div><i class="cu l" aria-hidden="true"></i><i class="cu r" aria-hidden="true"></i><i class="vl" aria-hidden="true"></i><div class="dl" role="dialog" aria-modal="true" aria-labelledby="uvq13-tel-t"><p class="kk">Premiere</p><p class="ti" id="uvq13-tel-t">The Sleeping City</p><p class="dt">Friday 14 · 21:30 · Screen 3</p><p class="sp">12 seats left</p><div class="ac"><button type="button" class="go">Book a seat</button><button type="button" class="x">Not now</button></div></div></div>
```

### CSS

```css
.uvq13-tel {
  --c1: #9f1239;
  --c2: #f2c14e;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq13-tel {
  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;
  width: 22em;
  height: 18em;
  border-radius: 1.2em;
  overflow: hidden;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-tel .pg {
  position: absolute;
  inset: 0;
  padding: 1.2em;
  display: grid;
  align-content: start;
  gap: .55em;
}

.uvq13-tel .pg i {
  height: .6em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq13-tel .pg .h {
  width: 45%;
  height: 1em;
  margin-bottom: .4em;
  background: color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq13-tel .pg .s {
  width: 60%;
}

.uvq13-tel .scr {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10,12,20,.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel.open .scr {
  opacity: 1;
  pointer-events: auto;
}

.uvq13-tel .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  right: 1em;
  top: 1em;
  z-index: 1;
  padding: .55em .95em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 650;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel .fire:active {
  transform: scale(.96);
}

.uvq13-tel button:focus-visible,.uvq13-tel a:focus-visible,.uvq13-tel input:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq13-tel .scr {
  background: radial-gradient(55% 60% at 50% 38%,rgba(255,236,190,.28),transparent 70%),#140a0d;
}

.uvq13-tel .cu {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 51%;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(0,0,0,.3),transparent 25%,transparent 78%,rgba(0,0,0,.4)),repeating-linear-gradient(90deg,rgba(0,0,0,.45) 0,rgba(0,0,0,.08) .55em,rgba(255,255,255,.14) .95em,rgba(0,0,0,.08) 1.35em,rgba(0,0,0,.45) 1.9em),var(--c1);
  transform: scaleX(0);
  transition: transform calc(0.75s / var(--k)) cubic-bezier(.65,0,.35,1),border-radius calc(0.75s / var(--k)) cubic-bezier(.65,0,.35,1);
}

.uvq13-tel .cu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: .55em;
  background: repeating-linear-gradient(90deg,var(--c2) 0 .12em,transparent .12em .3em);
  box-shadow: 0 -.12em 0 var(--c2);
}

.uvq13-tel .cu.l {
  left: 0;
  transform-origin: 0 50%;
}

.uvq13-tel .cu.r {
  right: 0;
  transform-origin: 100% 50%;
}

.uvq13-tel.open .cu {
  transform: scaleX(1);
}

.uvq13-tel.rv .cu {
  transform: scaleX(.3);
}

.uvq13-tel.rv .cu.l {
  border-bottom-right-radius: 100% 30%;
}

.uvq13-tel.rv .cu.r {
  border-bottom-left-radius: 100% 30%;
}

.uvq13-tel .vl {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 7;
  height: 1.9em;
  background: radial-gradient(1.15em 1em at 50% 0,color-mix(in srgb,var(--c1) 82%,#000) 97%,transparent 100%) 0 .9em/2.3em 1em repeat-x,linear-gradient(color-mix(in srgb,var(--c1) 82%,#000),color-mix(in srgb,var(--c1) 82%,#000)) 0 0/100% .95em no-repeat;
  transform: translateY(-110%);
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq13-tel .vl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: .75em;
  height: .14em;
  background: var(--c2);
}

.uvq13-tel.open .vl {
  transform: none;
}

.uvq13-tel .dl {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 8;
  box-sizing: border-box;
  width: 12em;
  padding: 1em 1.1em;
  border-radius: .4em;
  text-align: center;
  color: #2a1a10;
  background: #fbf3e2;
  box-shadow: 0 0 0 .25em #fbf3e2,0 0 0 .38em var(--c2),0 1.5em 3em -1em rgba(0,0,0,.85);
  transform: translate(-50%,-44%) scale(.92);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel.rv .dl {
  transform: translate(-50%,-50%);
  opacity: 1;
  pointer-events: auto;
  transition-delay: calc(.35s / var(--k));
}

.uvq13-tel .dl p {
  margin: 0;
}

.uvq13-tel .kk {
  font: 700 .6em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--c1);
}

.uvq13-tel .ti {
  margin: .4em 0 .3em!important;
  font: italic 700 1.35em/1.05 Georgia,"Times New Roman",serif;
  letter-spacing: -.01em;
}

.uvq13-tel .dt {
  font-size: .68em;
  opacity: .75;
}

.uvq13-tel .sp {
  margin-top: .5em!important;
  font-size: .64em;
  font-weight: 700;
  color: var(--c1);
}

.uvq13-tel .ac {
  display: grid;
  gap: .3em;
  margin-top: .8em;
}

.uvq13-tel .ac button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em;
  border-radius: .4em;
  font-size: .78em;
  font-weight: 700;
}

.uvq13-tel .ac .go {
  color: #fff;
  background: var(--c1);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel .ac .go:hover {
  transform: translateY(-1px);
}

.uvq13-tel .ac .x {
  color: #6b4f3a;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.uvq13-tel .dl button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

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

### JavaScript

```js
document.querySelectorAll(".uvq13-tel").forEach(el => {
  const fire=el.querySelector(".fire"),scr=el.querySelector(".scr"),pnl=el.querySelector(".dl");let tms=[];const later=(f,ms)=>tms.push(setTimeout(f,ms));
const foc=(t,ms)=>later(()=>{const n=typeof t==="string"?el.querySelector(t):t;n&&n.focus({preventScroll:true})},ms||0);
const isOpen=()=>el.classList.contains("open");
const open=u=>{if(isOpen())return;el.classList.add("open");pnl.inert=false;fire&&fire.setAttribute("aria-expanded","true");later(()=>isOpen()&&el.classList.add('rv'),700);u&&foc('.go',1250)};
const close=()=>{if(!isOpen())return;el.classList.remove("open");pnl.inert=true;fire&&fire.setAttribute("aria-expanded","false");;fire&&fire.focus({preventScroll:true})};
fire&&fire.addEventListener("click",()=>isOpen()?shut():open(true));scr&&scr.addEventListener("click",()=>shut());
el.addEventListener("keydown",e=>{if(!isOpen())return;if(e.key==="Escape"){e.preventDefault();e.stopPropagation();shut()}else if(e.key==="Tab"){const f=[...pnl.querySelectorAll('button:not([disabled]),input:not([disabled]),textarea,a[href],[tabindex="0"]')].filter(x=>x.getClientRects().length);if(!f.length){e.preventDefault();return}const a=f[0],z=f[f.length-1],ac=document.activeElement;if(e.shiftKey&&(ac===a||!pnl.contains(ac))){e.preventDefault();z.focus()}else if(!e.shiftKey&&(ac===z||!pnl.contains(ac))){e.preventDefault();a.focus()}}});
pnl.inert=true;later(()=>open(false),500);const shut=()=>{if(!isOpen())return;el.classList.remove("rv");later(close,750)};
el.querySelector(".x").addEventListener("click",shut);el.querySelector(".go").addEventListener("click",shut);return()=>tms.forEach(clearTimeout)
});
```

### 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 = `
.uvq13-tel {
  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;
  width: 22em;
  height: 18em;
  border-radius: 1.2em;
  overflow: hidden;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-tel .pg {
  position: absolute;
  inset: 0;
  padding: 1.2em;
  display: grid;
  align-content: start;
  gap: .55em;
}

.uvq13-tel .pg i {
  height: .6em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq13-tel .pg .h {
  width: 45%;
  height: 1em;
  margin-bottom: .4em;
  background: color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq13-tel .pg .s {
  width: 60%;
}

.uvq13-tel .scr {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10,12,20,.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel.open .scr {
  opacity: 1;
  pointer-events: auto;
}

.uvq13-tel .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  right: 1em;
  top: 1em;
  z-index: 1;
  padding: .55em .95em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 650;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel .fire:active {
  transform: scale(.96);
}

.uvq13-tel button:focus-visible,.uvq13-tel a:focus-visible,.uvq13-tel input:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq13-tel .scr {
  background: radial-gradient(55% 60% at 50% 38%,rgba(255,236,190,.28),transparent 70%),#140a0d;
}

.uvq13-tel .cu {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 51%;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(0,0,0,.3),transparent 25%,transparent 78%,rgba(0,0,0,.4)),repeating-linear-gradient(90deg,rgba(0,0,0,.45) 0,rgba(0,0,0,.08) .55em,rgba(255,255,255,.14) .95em,rgba(0,0,0,.08) 1.35em,rgba(0,0,0,.45) 1.9em),var(--c1);
  transform: scaleX(0);
  transition: transform calc(0.75s / var(--k)) cubic-bezier(.65,0,.35,1),border-radius calc(0.75s / var(--k)) cubic-bezier(.65,0,.35,1);
}

.uvq13-tel .cu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: .55em;
  background: repeating-linear-gradient(90deg,var(--c2) 0 .12em,transparent .12em .3em);
  box-shadow: 0 -.12em 0 var(--c2);
}

.uvq13-tel .cu.l {
  left: 0;
  transform-origin: 0 50%;
}

.uvq13-tel .cu.r {
  right: 0;
  transform-origin: 100% 50%;
}

.uvq13-tel.open .cu {
  transform: scaleX(1);
}

.uvq13-tel.rv .cu {
  transform: scaleX(.3);
}

.uvq13-tel.rv .cu.l {
  border-bottom-right-radius: 100% 30%;
}

.uvq13-tel.rv .cu.r {
  border-bottom-left-radius: 100% 30%;
}

.uvq13-tel .vl {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 7;
  height: 1.9em;
  background: radial-gradient(1.15em 1em at 50% 0,color-mix(in srgb,var(--c1) 82%,#000) 97%,transparent 100%) 0 .9em/2.3em 1em repeat-x,linear-gradient(color-mix(in srgb,var(--c1) 82%,#000),color-mix(in srgb,var(--c1) 82%,#000)) 0 0/100% .95em no-repeat;
  transform: translateY(-110%);
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq13-tel .vl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: .75em;
  height: .14em;
  background: var(--c2);
}

.uvq13-tel.open .vl {
  transform: none;
}

.uvq13-tel .dl {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 8;
  box-sizing: border-box;
  width: 12em;
  padding: 1em 1.1em;
  border-radius: .4em;
  text-align: center;
  color: #2a1a10;
  background: #fbf3e2;
  box-shadow: 0 0 0 .25em #fbf3e2,0 0 0 .38em var(--c2),0 1.5em 3em -1em rgba(0,0,0,.85);
  transform: translate(-50%,-44%) scale(.92);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel.rv .dl {
  transform: translate(-50%,-50%);
  opacity: 1;
  pointer-events: auto;
  transition-delay: calc(.35s / var(--k));
}

.uvq13-tel .dl p {
  margin: 0;
}

.uvq13-tel .kk {
  font: 700 .6em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--c1);
}

.uvq13-tel .ti {
  margin: .4em 0 .3em!important;
  font: italic 700 1.35em/1.05 Georgia,"Times New Roman",serif;
  letter-spacing: -.01em;
}

.uvq13-tel .dt {
  font-size: .68em;
  opacity: .75;
}

.uvq13-tel .sp {
  margin-top: .5em!important;
  font-size: .64em;
  font-weight: 700;
  color: var(--c1);
}

.uvq13-tel .ac {
  display: grid;
  gap: .3em;
  margin-top: .8em;
}

.uvq13-tel .ac button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em;
  border-radius: .4em;
  font-size: .78em;
  font-weight: 700;
}

.uvq13-tel .ac .go {
  color: #fff;
  background: var(--c1);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel .ac .go:hover {
  transform: translateY(-1px);
}

.uvq13-tel .ac .x {
  color: #6b4f3a;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.uvq13-tel .dl button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

@media (prefers-reduced-motion:reduce) {
  .uvq13-tel,.uvq13-tel *,.uvq13-tel *::before,.uvq13-tel *::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 fire=el.querySelector(".fire"),scr=el.querySelector(".scr"),pnl=el.querySelector(".dl");let tms=[];const later=(f,ms)=>tms.push(setTimeout(f,ms));
const foc=(t,ms)=>later(()=>{const n=typeof t==="string"?el.querySelector(t):t;n&&n.focus({preventScroll:true})},ms||0);
const isOpen=()=>el.classList.contains("open");
const open=u=>{if(isOpen())return;el.classList.add("open");pnl.inert=false;fire&&fire.setAttribute("aria-expanded","true");later(()=>isOpen()&&el.classList.add('rv'),700);u&&foc('.go',1250)};
const close=()=>{if(!isOpen())return;el.classList.remove("open");pnl.inert=true;fire&&fire.setAttribute("aria-expanded","false");;fire&&fire.focus({preventScroll:true})};
fire&&fire.addEventListener("click",()=>isOpen()?shut():open(true));scr&&scr.addEventListener("click",()=>shut());
el.addEventListener("keydown",e=>{if(!isOpen())return;if(e.key==="Escape"){e.preventDefault();e.stopPropagation();shut()}else if(e.key==="Tab"){const f=[...pnl.querySelectorAll('button:not([disabled]),input:not([disabled]),textarea,a[href],[tabindex="0"]')].filter(x=>x.getClientRects().length);if(!f.length){e.preventDefault();return}const a=f[0],z=f[f.length-1],ac=document.activeElement;if(e.shiftKey&&(ac===a||!pnl.contains(ac))){e.preventDefault();z.focus()}else if(!e.shiftKey&&(ac===z||!pnl.contains(ac))){e.preventDefault();a.focus()}}});
pnl.inert=true;later(()=>open(false),500);const shut=()=>{if(!isOpen())return;el.classList.remove("rv");later(close,750)};
el.querySelector(".x").addEventListener("click",shut);el.querySelector(".go").addEventListener("click",shut);return()=>tms.forEach(clearTimeout)
}

export default function OvTheaterCurtain() {
  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": "#9f1239",
          "--c2": "#f2c14e",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq13-tel"><div className="pg" aria-hidden="true"><i className="h"></i><i></i><i></i><i></i><i></i><i className="s"></i></div><button type="button" className="fire" aria-haspopup="dialog">See the premiere</button><div className="scr"></div><i className="cu l" aria-hidden="true"></i><i className="cu r" aria-hidden="true"></i><i className="vl" aria-hidden="true"></i><div className="dl" role="dialog" aria-modal="true" aria-labelledby="uvq13-tel-t"><p className="kk">Premiere</p><p className="ti" id="uvq13-tel-t">The Sleeping City</p><p className="dt">Friday 14 · 21:30 · Screen 3</p><p className="sp">12 seats left</p><div className="ac"><button type="button" className="go">Book a seat</button><button type="button" className="x">Not now</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 “Theater curtain modal” block (Overlays) from AIMRAN Library to my project.

## What it is
A velvet curtain closes over the page and opens again to present the ticket for the premiere.

## Chosen settings
- Main color: #9f1239
- Secondary color: #f2c14e
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "La ciudad dormida"

## 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 = `
.uvq13-tel {
  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;
  width: 22em;
  height: 18em;
  border-radius: 1.2em;
  overflow: hidden;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-tel .pg {
  position: absolute;
  inset: 0;
  padding: 1.2em;
  display: grid;
  align-content: start;
  gap: .55em;
}

.uvq13-tel .pg i {
  height: .6em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq13-tel .pg .h {
  width: 45%;
  height: 1em;
  margin-bottom: .4em;
  background: color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq13-tel .pg .s {
  width: 60%;
}

.uvq13-tel .scr {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10,12,20,.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel.open .scr {
  opacity: 1;
  pointer-events: auto;
}

.uvq13-tel .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  right: 1em;
  top: 1em;
  z-index: 1;
  padding: .55em .95em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 650;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel .fire:active {
  transform: scale(.96);
}

.uvq13-tel button:focus-visible,.uvq13-tel a:focus-visible,.uvq13-tel input:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq13-tel .scr {
  background: radial-gradient(55% 60% at 50% 38%,rgba(255,236,190,.28),transparent 70%),#140a0d;
}

.uvq13-tel .cu {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 51%;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(0,0,0,.3),transparent 25%,transparent 78%,rgba(0,0,0,.4)),repeating-linear-gradient(90deg,rgba(0,0,0,.45) 0,rgba(0,0,0,.08) .55em,rgba(255,255,255,.14) .95em,rgba(0,0,0,.08) 1.35em,rgba(0,0,0,.45) 1.9em),var(--c1);
  transform: scaleX(0);
  transition: transform calc(0.75s / var(--k)) cubic-bezier(.65,0,.35,1),border-radius calc(0.75s / var(--k)) cubic-bezier(.65,0,.35,1);
}

.uvq13-tel .cu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: .55em;
  background: repeating-linear-gradient(90deg,var(--c2) 0 .12em,transparent .12em .3em);
  box-shadow: 0 -.12em 0 var(--c2);
}

.uvq13-tel .cu.l {
  left: 0;
  transform-origin: 0 50%;
}

.uvq13-tel .cu.r {
  right: 0;
  transform-origin: 100% 50%;
}

.uvq13-tel.open .cu {
  transform: scaleX(1);
}

.uvq13-tel.rv .cu {
  transform: scaleX(.3);
}

.uvq13-tel.rv .cu.l {
  border-bottom-right-radius: 100% 30%;
}

.uvq13-tel.rv .cu.r {
  border-bottom-left-radius: 100% 30%;
}

.uvq13-tel .vl {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 7;
  height: 1.9em;
  background: radial-gradient(1.15em 1em at 50% 0,color-mix(in srgb,var(--c1) 82%,#000) 97%,transparent 100%) 0 .9em/2.3em 1em repeat-x,linear-gradient(color-mix(in srgb,var(--c1) 82%,#000),color-mix(in srgb,var(--c1) 82%,#000)) 0 0/100% .95em no-repeat;
  transform: translateY(-110%);
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq13-tel .vl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: .75em;
  height: .14em;
  background: var(--c2);
}

.uvq13-tel.open .vl {
  transform: none;
}

.uvq13-tel .dl {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 8;
  box-sizing: border-box;
  width: 12em;
  padding: 1em 1.1em;
  border-radius: .4em;
  text-align: center;
  color: #2a1a10;
  background: #fbf3e2;
  box-shadow: 0 0 0 .25em #fbf3e2,0 0 0 .38em var(--c2),0 1.5em 3em -1em rgba(0,0,0,.85);
  transform: translate(-50%,-44%) scale(.92);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel.rv .dl {
  transform: translate(-50%,-50%);
  opacity: 1;
  pointer-events: auto;
  transition-delay: calc(.35s / var(--k));
}

.uvq13-tel .dl p {
  margin: 0;
}

.uvq13-tel .kk {
  font: 700 .6em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--c1);
}

.uvq13-tel .ti {
  margin: .4em 0 .3em!important;
  font: italic 700 1.35em/1.05 Georgia,"Times New Roman",serif;
  letter-spacing: -.01em;
}

.uvq13-tel .dt {
  font-size: .68em;
  opacity: .75;
}

.uvq13-tel .sp {
  margin-top: .5em!important;
  font-size: .64em;
  font-weight: 700;
  color: var(--c1);
}

.uvq13-tel .ac {
  display: grid;
  gap: .3em;
  margin-top: .8em;
}

.uvq13-tel .ac button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em;
  border-radius: .4em;
  font-size: .78em;
  font-weight: 700;
}

.uvq13-tel .ac .go {
  color: #fff;
  background: var(--c1);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-tel .ac .go:hover {
  transform: translateY(-1px);
}

.uvq13-tel .ac .x {
  color: #6b4f3a;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.uvq13-tel .dl button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

@media (prefers-reduced-motion:reduce) {
  .uvq13-tel,.uvq13-tel *,.uvq13-tel *::before,.uvq13-tel *::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 fire=el.querySelector(".fire"),scr=el.querySelector(".scr"),pnl=el.querySelector(".dl");let tms=[];const later=(f,ms)=>tms.push(setTimeout(f,ms));
const foc=(t,ms)=>later(()=>{const n=typeof t==="string"?el.querySelector(t):t;n&&n.focus({preventScroll:true})},ms||0);
const isOpen=()=>el.classList.contains("open");
const open=u=>{if(isOpen())return;el.classList.add("open");pnl.inert=false;fire&&fire.setAttribute("aria-expanded","true");later(()=>isOpen()&&el.classList.add('rv'),700);u&&foc('.go',1250)};
const close=()=>{if(!isOpen())return;el.classList.remove("open");pnl.inert=true;fire&&fire.setAttribute("aria-expanded","false");;fire&&fire.focus({preventScroll:true})};
fire&&fire.addEventListener("click",()=>isOpen()?shut():open(true));scr&&scr.addEventListener("click",()=>shut());
el.addEventListener("keydown",e=>{if(!isOpen())return;if(e.key==="Escape"){e.preventDefault();e.stopPropagation();shut()}else if(e.key==="Tab"){const f=[...pnl.querySelectorAll('button:not([disabled]),input:not([disabled]),textarea,a[href],[tabindex="0"]')].filter(x=>x.getClientRects().length);if(!f.length){e.preventDefault();return}const a=f[0],z=f[f.length-1],ac=document.activeElement;if(e.shiftKey&&(ac===a||!pnl.contains(ac))){e.preventDefault();z.focus()}else if(!e.shiftKey&&(ac===z||!pnl.contains(ac))){e.preventDefault();a.focus()}}});
pnl.inert=true;later(()=>open(false),500);const shut=()=>{if(!isOpen())return;el.classList.remove("rv");later(close,750)};
el.querySelector(".x").addEventListener("click",shut);el.querySelector(".go").addEventListener("click",shut);return()=>tms.forEach(clearTimeout)
}

export default function OvTheaterCurtain() {
  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": "#9f1239",
          "--c2": "#f2c14e",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq13-tel"><div className="pg" aria-hidden="true"><i className="h"></i><i></i><i></i><i></i><i></i><i className="s"></i></div><button type="button" className="fire" aria-haspopup="dialog">See the premiere</button><div className="scr"></div><i className="cu l" aria-hidden="true"></i><i className="cu r" aria-hidden="true"></i><i className="vl" aria-hidden="true"></i><div className="dl" role="dialog" aria-modal="true" aria-labelledby="uvq13-tel-t"><p className="kk">Premiere</p><p className="ti" id="uvq13-tel-t">The Sleeping City</p><p className="dt">Friday 14 · 21:30 · Screen 3</p><p className="sp">12 seats left</p><div className="ac"><button type="button" className="go">Book a seat</button><button type="button" className="x">Not now</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.
````
