# Antique map ribbon tooltip

> A parchment map of the Iberian Peninsula: each city unfurls a banner ribbon with its Roman name and its name today.

- Category: [Tooltips](https://library.aimran.es/components/tooltips)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-tip-antique-map
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

An old style map on parchment with an inked coastline, rivers, little mountain marks, a sailing ship and a cartouche with the title. Each city is a small castle button. Hover or focus one and a cream ribbon with forked tails unfurls from its center with the Roman name in italic serif and the modern name below, like the banderoles on Renaissance maps.

The main color sets the ribbon ink and the castles, the second the drawing on the map. Swap the outline and the places for your own region, a fantasy world or a vineyard map, and anchor the ribbons left or right near the edges.

## Code

### HTML

```html
<div class="uvq08-old"><div class="pg"><svg viewBox="0 0 120 90" aria-hidden="true"><polygon class="sd" points="20,15 32,12 47,15 60,14 70,17 82,21 92,23 100,26 96,31 90,37 84,44 82,51 87,58 82,64 77,71 69,76 59,80 50,82 44,83 38,79 32,74 24,75 18,73 20,63 17,55 18,48 20,41 18,30 16,22"/><polygon class="ld" points="20,15 32,12 47,15 60,14 70,17 82,21 92,23 100,26 96,31 90,37 84,44 82,51 87,58 82,64 77,71 69,76 59,80 50,82 44,83 38,79 32,74 24,75 18,73 20,63 17,55 18,48 20,41 18,30 16,22"/><path class="rv" d="M64 46C56 48 48 54 40 52S28 54 21 50M62 23C70 27 78 33 88 41M70 40C60 44 52 60 44 64S36 70 30 72"/><path class="mt" d="M30 20l3-4 3 4M36 18l3-4 3 4M70 22l2.5-3.5 2.5 3.5M76 24l2.5-3.5 2.5 3.5M58 66l2.5-3.5 2.5 3.5M64 64l2.5-3.5 2.5 3.5M46 36l2-3 2 3"/><path class="sh" d="M6 76h10l-2 3H8zM11 76V67M11 68l4 5h-4M11 69l-3.5 4h3.5"/><path class="wv" d="M4 60q2-1.5 4 0t4 0M100 50q2-1.5 4 0t4 0M18 86q2-1.5 4 0t4 0"/></svg><span class="cr" aria-hidden="true"><b>HISPANIA</b><span>ANNO MDLXX</span></span><button type="button" class="ct l" style="left:17.5%;top:55.6%" aria-label="Olisipo" aria-describedby="uvq08-old-0"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z"/></svg><span class="rb" role="tooltip" id="uvq08-old-0"><b>Olisipo</b><span>now Lisbon</span></span></button><button type="button" class="ct c" style="left:27.5%;top:61.1%" aria-label="Emerita Augusta" aria-describedby="uvq08-old-1"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z"/></svg><span class="rb" role="tooltip" id="uvq08-old-1"><b>Emerita Augusta</b><span>now Mérida</span></span></button><button type="button" class="ct c pk" style="left:46.7%;top:56.7%" aria-label="Toletum" aria-describedby="uvq08-old-2"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z"/></svg><span class="rb" role="tooltip" id="uvq08-old-2"><b>Toletum</b><span>now Toledo</span></span></button><button type="button" class="ct c" style="left:32.5%;top:86.7%" aria-label="Gades" aria-describedby="uvq08-old-3"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z"/></svg><span class="rb" role="tooltip" id="uvq08-old-3"><b>Gades</b><span>now Cádiz</span></span></button><button type="button" class="ct r" style="left:76.7%;top:33.3%" aria-label="Barcino" aria-describedby="uvq08-old-4"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z"/></svg><span class="rb" role="tooltip" id="uvq08-old-4"><b>Barcino</b><span>now Barcelona</span></span></button></div></div>
```

### CSS

```css
.uvq08-old {
  --c1: #8b2e1f;
  --c2: #5b3a1a;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq08-old {
  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;
  padding-top: .6em;
}

.uvq08-old .pg {
  position: relative;
  width: 18em;
  height: 13.5em;
  border-radius: .4em;
  background: radial-gradient(circle at 18% 28%,rgba(120,80,30,.14),transparent 40%),radial-gradient(circle at 82% 78%,rgba(120,80,30,.16),transparent 35%),repeating-linear-gradient(0deg,rgba(90,60,30,.06) 0 1px,transparent 1px 4px),linear-gradient(160deg,#f1e3c2,#e1c995);
  box-shadow: inset 0 0 2.2em rgba(110,70,20,.4),0 1.2em 2em -1em rgba(60,35,10,.55);
}

.uvq08-old svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.uvq08-old .sd {
  fill: none;
  stroke: var(--c2);
  stroke-width: 3;
  stroke-linejoin: round;
  opacity: .12;
}

.uvq08-old .ld {
  fill: rgba(214,186,120,.55);
  stroke: var(--c2);
  stroke-width: .6;
  stroke-linejoin: round;
}

.uvq08-old .rv {
  fill: none;
  stroke: #4f6f8f;
  stroke-width: .45;
  opacity: .75;
}

.uvq08-old .mt,.uvq08-old .sh,.uvq08-old .wv {
  fill: none;
  stroke: var(--c2);
  stroke-width: .5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}

.uvq08-old .cr {
  position: absolute;
  right: .7em;
  bottom: .7em;
  display: grid;
  justify-items: center;
  padding: .35em .8em;
  border: 3px double var(--c2);
  border-radius: .2em;
  font-family: Georgia,"Times New Roman",serif;
  color: var(--c2);
  background: rgba(245,232,200,.85);
}

.uvq08-old .cr b {
  font-size: .95em;
  letter-spacing: .22em;
}

.uvq08-old .cr span {
  font-size: .5em;
  letter-spacing: .2em;
}

.uvq08-old .ct {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.8em;
  height: 1.8em;
  translate: -50% -50%;
  border-radius: 50%;
  color: var(--c1);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-old .ct svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  filter: drop-shadow(0 1px 0 rgba(255,240,210,.8));
}

.uvq08-old .ct:hover {
  transform: scale(1.15);
}

.uvq08-old .ct:active {
  transform: scale(.92);
}

.uvq08-old .ct:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 1px;
}

.uvq08-old .rb {
  position: absolute;
  left: 50%;
  bottom: calc(100% + .2em);
  display: grid;
  justify-items: center;
  padding: .3em .9em .35em;
  translate: -50% 0;
  white-space: nowrap;
  color: var(--c1);
  background: linear-gradient(#fbf1d6,#ecdcb0);
  border-block: 1.5px solid var(--c1);
  font: italic 700 .82em/1.15 Georgia,"Times New Roman",serif;
  filter: drop-shadow(0 .2em .2em rgba(60,30,0,.3));
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-old .rb span {
  font: 500 .72em/1.2 Georgia,"Times New Roman",serif;
  font-style: normal;
  color: var(--c2);
}

.uvq08-old .rb::before,.uvq08-old .rb::after {
  content: "";
  position: absolute;
  top: .35em;
  width: 1.1em;
  height: 100%;
  box-sizing: border-box;
  background: #d8c088;
  border-block: 1.5px solid var(--c1);
}

.uvq08-old .rb::before {
  right: 100%;
  clip-path: polygon(0 0,100% 0,100% 100%,0 100%,40% 50%);
}

.uvq08-old .rb::after {
  left: 100%;
  clip-path: polygon(0 0,100% 0,60% 50%,100% 100%,0 100%);
}

.uvq08-old .l .rb {
  left: -.2em;
  translate: 0 0;
  transform-origin: 0 50%;
}

.uvq08-old .r .rb {
  left: auto;
  right: -.2em;
  translate: 0 0;
  transform-origin: 100% 50%;
}

.uvq08-old .ct:is(:hover,:focus-visible,.pk) {
  z-index: 4;
}

.uvq08-old .ct:is(:hover,:focus-visible,.pk) .rb {
  transform: none;
  opacity: 1;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

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

### JavaScript

```js
document.querySelectorAll(".uvq08-old").forEach(el => {
  const unpk=()=>{el.classList.remove("pk");el.querySelectorAll(".pk").forEach(x=>x.classList.remove("pk"))};el.addEventListener("pointerover",unpk,{once:true});el.addEventListener("focusin",unpk,{once:true});
});
```

### 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 = `
.uvq08-old {
  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;
  padding-top: .6em;
}

.uvq08-old .pg {
  position: relative;
  width: 18em;
  height: 13.5em;
  border-radius: .4em;
  background: radial-gradient(circle at 18% 28%,rgba(120,80,30,.14),transparent 40%),radial-gradient(circle at 82% 78%,rgba(120,80,30,.16),transparent 35%),repeating-linear-gradient(0deg,rgba(90,60,30,.06) 0 1px,transparent 1px 4px),linear-gradient(160deg,#f1e3c2,#e1c995);
  box-shadow: inset 0 0 2.2em rgba(110,70,20,.4),0 1.2em 2em -1em rgba(60,35,10,.55);
}

.uvq08-old svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.uvq08-old .sd {
  fill: none;
  stroke: var(--c2);
  stroke-width: 3;
  stroke-linejoin: round;
  opacity: .12;
}

.uvq08-old .ld {
  fill: rgba(214,186,120,.55);
  stroke: var(--c2);
  stroke-width: .6;
  stroke-linejoin: round;
}

.uvq08-old .rv {
  fill: none;
  stroke: #4f6f8f;
  stroke-width: .45;
  opacity: .75;
}

.uvq08-old .mt,.uvq08-old .sh,.uvq08-old .wv {
  fill: none;
  stroke: var(--c2);
  stroke-width: .5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}

.uvq08-old .cr {
  position: absolute;
  right: .7em;
  bottom: .7em;
  display: grid;
  justify-items: center;
  padding: .35em .8em;
  border: 3px double var(--c2);
  border-radius: .2em;
  font-family: Georgia,"Times New Roman",serif;
  color: var(--c2);
  background: rgba(245,232,200,.85);
}

.uvq08-old .cr b {
  font-size: .95em;
  letter-spacing: .22em;
}

.uvq08-old .cr span {
  font-size: .5em;
  letter-spacing: .2em;
}

.uvq08-old .ct {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.8em;
  height: 1.8em;
  translate: -50% -50%;
  border-radius: 50%;
  color: var(--c1);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-old .ct svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  filter: drop-shadow(0 1px 0 rgba(255,240,210,.8));
}

.uvq08-old .ct:hover {
  transform: scale(1.15);
}

.uvq08-old .ct:active {
  transform: scale(.92);
}

.uvq08-old .ct:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 1px;
}

.uvq08-old .rb {
  position: absolute;
  left: 50%;
  bottom: calc(100% + .2em);
  display: grid;
  justify-items: center;
  padding: .3em .9em .35em;
  translate: -50% 0;
  white-space: nowrap;
  color: var(--c1);
  background: linear-gradient(#fbf1d6,#ecdcb0);
  border-block: 1.5px solid var(--c1);
  font: italic 700 .82em/1.15 Georgia,"Times New Roman",serif;
  filter: drop-shadow(0 .2em .2em rgba(60,30,0,.3));
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-old .rb span {
  font: 500 .72em/1.2 Georgia,"Times New Roman",serif;
  font-style: normal;
  color: var(--c2);
}

.uvq08-old .rb::before,.uvq08-old .rb::after {
  content: "";
  position: absolute;
  top: .35em;
  width: 1.1em;
  height: 100%;
  box-sizing: border-box;
  background: #d8c088;
  border-block: 1.5px solid var(--c1);
}

.uvq08-old .rb::before {
  right: 100%;
  clip-path: polygon(0 0,100% 0,100% 100%,0 100%,40% 50%);
}

.uvq08-old .rb::after {
  left: 100%;
  clip-path: polygon(0 0,100% 0,60% 50%,100% 100%,0 100%);
}

.uvq08-old .l .rb {
  left: -.2em;
  translate: 0 0;
  transform-origin: 0 50%;
}

.uvq08-old .r .rb {
  left: auto;
  right: -.2em;
  translate: 0 0;
  transform-origin: 100% 50%;
}

.uvq08-old .ct:is(:hover,:focus-visible,.pk) {
  z-index: 4;
}

.uvq08-old .ct:is(:hover,:focus-visible,.pk) .rb {
  transform: none;
  opacity: 1;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@media (prefers-reduced-motion:reduce) {
  .uvq08-old,.uvq08-old *,.uvq08-old *::before,.uvq08-old *::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 unpk=()=>{el.classList.remove("pk");el.querySelectorAll(".pk").forEach(x=>x.classList.remove("pk"))};el.addEventListener("pointerover",unpk,{once:true});el.addEventListener("focusin",unpk,{once:true});
}

export default function TipAntiqueMap() {
  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": "#8b2e1f",
          "--c2": "#5b3a1a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq08-old"><div className="pg"><svg viewBox="0 0 120 90" aria-hidden="true"><polygon className="sd" points="20,15 32,12 47,15 60,14 70,17 82,21 92,23 100,26 96,31 90,37 84,44 82,51 87,58 82,64 77,71 69,76 59,80 50,82 44,83 38,79 32,74 24,75 18,73 20,63 17,55 18,48 20,41 18,30 16,22" /><polygon className="ld" points="20,15 32,12 47,15 60,14 70,17 82,21 92,23 100,26 96,31 90,37 84,44 82,51 87,58 82,64 77,71 69,76 59,80 50,82 44,83 38,79 32,74 24,75 18,73 20,63 17,55 18,48 20,41 18,30 16,22" /><path className="rv" d="M64 46C56 48 48 54 40 52S28 54 21 50M62 23C70 27 78 33 88 41M70 40C60 44 52 60 44 64S36 70 30 72" /><path className="mt" d="M30 20l3-4 3 4M36 18l3-4 3 4M70 22l2.5-3.5 2.5 3.5M76 24l2.5-3.5 2.5 3.5M58 66l2.5-3.5 2.5 3.5M64 64l2.5-3.5 2.5 3.5M46 36l2-3 2 3" /><path className="sh" d="M6 76h10l-2 3H8zM11 76V67M11 68l4 5h-4M11 69l-3.5 4h3.5" /><path className="wv" d="M4 60q2-1.5 4 0t4 0M100 50q2-1.5 4 0t4 0M18 86q2-1.5 4 0t4 0" /></svg><span className="cr" aria-hidden="true"><b>HISPANIA</b><span>ANNO MDLXX</span></span><button type="button" className="ct l" style={{ left: "17.5%", top: "55.6%" }} aria-label="Olisipo" aria-describedby="uvq08-old-0"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-0"><b>Olisipo</b><span>now Lisbon</span></span></button><button type="button" className="ct c" style={{ left: "27.5%", top: "61.1%" }} aria-label="Emerita Augusta" aria-describedby="uvq08-old-1"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-1"><b>Emerita Augusta</b><span>now Mérida</span></span></button><button type="button" className="ct c pk" style={{ left: "46.7%", top: "56.7%" }} aria-label="Toletum" aria-describedby="uvq08-old-2"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-2"><b>Toletum</b><span>now Toledo</span></span></button><button type="button" className="ct c" style={{ left: "32.5%", top: "86.7%" }} aria-label="Gades" aria-describedby="uvq08-old-3"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-3"><b>Gades</b><span>now Cádiz</span></span></button><button type="button" className="ct r" style={{ left: "76.7%", top: "33.3%" }} aria-label="Barcino" aria-describedby="uvq08-old-4"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-4"><b>Barcino</b><span>now Barcelona</span></span></button></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 “Antique map ribbon tooltip” block (Tooltips) from AIMRAN Library to my project.

## What it is
A parchment map of the Iberian Peninsula: each city unfurls a banner ribbon with its Roman name and its name today.

## Chosen settings
- Main color: #8b2e1f
- Secondary color: #5b3a1a
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "HISPANIA"

## 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 = `
.uvq08-old {
  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;
  padding-top: .6em;
}

.uvq08-old .pg {
  position: relative;
  width: 18em;
  height: 13.5em;
  border-radius: .4em;
  background: radial-gradient(circle at 18% 28%,rgba(120,80,30,.14),transparent 40%),radial-gradient(circle at 82% 78%,rgba(120,80,30,.16),transparent 35%),repeating-linear-gradient(0deg,rgba(90,60,30,.06) 0 1px,transparent 1px 4px),linear-gradient(160deg,#f1e3c2,#e1c995);
  box-shadow: inset 0 0 2.2em rgba(110,70,20,.4),0 1.2em 2em -1em rgba(60,35,10,.55);
}

.uvq08-old svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.uvq08-old .sd {
  fill: none;
  stroke: var(--c2);
  stroke-width: 3;
  stroke-linejoin: round;
  opacity: .12;
}

.uvq08-old .ld {
  fill: rgba(214,186,120,.55);
  stroke: var(--c2);
  stroke-width: .6;
  stroke-linejoin: round;
}

.uvq08-old .rv {
  fill: none;
  stroke: #4f6f8f;
  stroke-width: .45;
  opacity: .75;
}

.uvq08-old .mt,.uvq08-old .sh,.uvq08-old .wv {
  fill: none;
  stroke: var(--c2);
  stroke-width: .5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}

.uvq08-old .cr {
  position: absolute;
  right: .7em;
  bottom: .7em;
  display: grid;
  justify-items: center;
  padding: .35em .8em;
  border: 3px double var(--c2);
  border-radius: .2em;
  font-family: Georgia,"Times New Roman",serif;
  color: var(--c2);
  background: rgba(245,232,200,.85);
}

.uvq08-old .cr b {
  font-size: .95em;
  letter-spacing: .22em;
}

.uvq08-old .cr span {
  font-size: .5em;
  letter-spacing: .2em;
}

.uvq08-old .ct {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.8em;
  height: 1.8em;
  translate: -50% -50%;
  border-radius: 50%;
  color: var(--c1);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-old .ct svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  filter: drop-shadow(0 1px 0 rgba(255,240,210,.8));
}

.uvq08-old .ct:hover {
  transform: scale(1.15);
}

.uvq08-old .ct:active {
  transform: scale(.92);
}

.uvq08-old .ct:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 1px;
}

.uvq08-old .rb {
  position: absolute;
  left: 50%;
  bottom: calc(100% + .2em);
  display: grid;
  justify-items: center;
  padding: .3em .9em .35em;
  translate: -50% 0;
  white-space: nowrap;
  color: var(--c1);
  background: linear-gradient(#fbf1d6,#ecdcb0);
  border-block: 1.5px solid var(--c1);
  font: italic 700 .82em/1.15 Georgia,"Times New Roman",serif;
  filter: drop-shadow(0 .2em .2em rgba(60,30,0,.3));
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-old .rb span {
  font: 500 .72em/1.2 Georgia,"Times New Roman",serif;
  font-style: normal;
  color: var(--c2);
}

.uvq08-old .rb::before,.uvq08-old .rb::after {
  content: "";
  position: absolute;
  top: .35em;
  width: 1.1em;
  height: 100%;
  box-sizing: border-box;
  background: #d8c088;
  border-block: 1.5px solid var(--c1);
}

.uvq08-old .rb::before {
  right: 100%;
  clip-path: polygon(0 0,100% 0,100% 100%,0 100%,40% 50%);
}

.uvq08-old .rb::after {
  left: 100%;
  clip-path: polygon(0 0,100% 0,60% 50%,100% 100%,0 100%);
}

.uvq08-old .l .rb {
  left: -.2em;
  translate: 0 0;
  transform-origin: 0 50%;
}

.uvq08-old .r .rb {
  left: auto;
  right: -.2em;
  translate: 0 0;
  transform-origin: 100% 50%;
}

.uvq08-old .ct:is(:hover,:focus-visible,.pk) {
  z-index: 4;
}

.uvq08-old .ct:is(:hover,:focus-visible,.pk) .rb {
  transform: none;
  opacity: 1;
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

@media (prefers-reduced-motion:reduce) {
  .uvq08-old,.uvq08-old *,.uvq08-old *::before,.uvq08-old *::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 unpk=()=>{el.classList.remove("pk");el.querySelectorAll(".pk").forEach(x=>x.classList.remove("pk"))};el.addEventListener("pointerover",unpk,{once:true});el.addEventListener("focusin",unpk,{once:true});
}

export default function TipAntiqueMap() {
  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": "#8b2e1f",
          "--c2": "#5b3a1a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq08-old"><div className="pg"><svg viewBox="0 0 120 90" aria-hidden="true"><polygon className="sd" points="20,15 32,12 47,15 60,14 70,17 82,21 92,23 100,26 96,31 90,37 84,44 82,51 87,58 82,64 77,71 69,76 59,80 50,82 44,83 38,79 32,74 24,75 18,73 20,63 17,55 18,48 20,41 18,30 16,22" /><polygon className="ld" points="20,15 32,12 47,15 60,14 70,17 82,21 92,23 100,26 96,31 90,37 84,44 82,51 87,58 82,64 77,71 69,76 59,80 50,82 44,83 38,79 32,74 24,75 18,73 20,63 17,55 18,48 20,41 18,30 16,22" /><path className="rv" d="M64 46C56 48 48 54 40 52S28 54 21 50M62 23C70 27 78 33 88 41M70 40C60 44 52 60 44 64S36 70 30 72" /><path className="mt" d="M30 20l3-4 3 4M36 18l3-4 3 4M70 22l2.5-3.5 2.5 3.5M76 24l2.5-3.5 2.5 3.5M58 66l2.5-3.5 2.5 3.5M64 64l2.5-3.5 2.5 3.5M46 36l2-3 2 3" /><path className="sh" d="M6 76h10l-2 3H8zM11 76V67M11 68l4 5h-4M11 69l-3.5 4h3.5" /><path className="wv" d="M4 60q2-1.5 4 0t4 0M100 50q2-1.5 4 0t4 0M18 86q2-1.5 4 0t4 0" /></svg><span className="cr" aria-hidden="true"><b>HISPANIA</b><span>ANNO MDLXX</span></span><button type="button" className="ct l" style={{ left: "17.5%", top: "55.6%" }} aria-label="Olisipo" aria-describedby="uvq08-old-0"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-0"><b>Olisipo</b><span>now Lisbon</span></span></button><button type="button" className="ct c" style={{ left: "27.5%", top: "61.1%" }} aria-label="Emerita Augusta" aria-describedby="uvq08-old-1"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-1"><b>Emerita Augusta</b><span>now Mérida</span></span></button><button type="button" className="ct c pk" style={{ left: "46.7%", top: "56.7%" }} aria-label="Toletum" aria-describedby="uvq08-old-2"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-2"><b>Toletum</b><span>now Toledo</span></span></button><button type="button" className="ct c" style={{ left: "32.5%", top: "86.7%" }} aria-label="Gades" aria-describedby="uvq08-old-3"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-3"><b>Gades</b><span>now Cádiz</span></span></button><button type="button" className="ct r" style={{ left: "76.7%", top: "33.3%" }} aria-label="Barcino" aria-describedby="uvq08-old-4"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 21V10h2.5V7H10v3h4V7h2.5v3H19v11h-5v-4h-4v4z" /></svg><span className="rb" role="tooltip" id="uvq08-old-4"><b>Barcino</b><span>now Barcelona</span></span></button></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.
````
