# Lunar atlas tooltip

> The near side of the Moon with its seas and craters marked: each gets a ring at its real size and opens its card.

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

## Where to use it

A Moon drawn entirely with layered CSS gradients: dark maria, bright craters, the faint rays of Tycho and a soft limb shadow on a starry card. Five features are buttons sized to their real extent on the disc. Hover or focus one and a dashed ring snaps around it while an atlas label gives its name, type, diameter and a short fact, like the Apollo 11 landing.

The main color sets the rings and the detail line, the second the night around the Moon. Add more craters by giving each one a position and a size in percent, or adapt the idea to a planet, an asteroid or a museum object.

## Code

### HTML

```html
<div class="uvq08-mon" role="group" aria-label="Near side of the Moon"><p class="hd" aria-hidden="true">Near side of the Moon</p><div class="mn"><button type="button" class="ft f0 dn pk" style="left:63%;top:47%;--s:17%" aria-label="Sea of Tranquility" aria-describedby="uvq08-mon-0"><span class="tt" role="tooltip" id="uvq08-mon-0"><b>Sea of Tranquility</b><code>Mare · 873 km</code><span>Apollo 11 landed here in 1969</span></span></button><button type="button" class="ft f1 dn" style="left:58%;top:30%;--s:14%" aria-label="Sea of Serenity" aria-describedby="uvq08-mon-1"><span class="tt" role="tooltip" id="uvq08-mon-1"><b>Sea of Serenity</b><code>Mare · 707 km</code><span>Smooth, dark basalt lava</span></span></button><button type="button" class="ft f2 dn" style="left:36%;top:30%;--s:22%" aria-label="Sea of Showers" aria-describedby="uvq08-mon-2"><span class="tt" role="tooltip" id="uvq08-mon-2"><b>Sea of Showers</b><code>Mare · 1,146 km</code><span>The largest sea on the near side</span></span></button><button type="button" class="ft f3 up" style="left:33%;top:53%;--s:7%" aria-label="Copernicus" aria-describedby="uvq08-mon-3"><span class="tt" role="tooltip" id="uvq08-mon-3"><b>Copernicus</b><code>Crater · 93 km</code><span>Its rays shine at full moon</span></span></button><button type="button" class="ft f4 up" style="left:45%;top:81%;--s:6%" aria-label="Tycho" aria-describedby="uvq08-mon-4"><span class="tt" role="tooltip" id="uvq08-mon-4"><b>Tycho</b><code>Crater · 85 km</code><span>Young: about 108 million years old</span></span></button></div></div>
```

### CSS

```css
.uvq08-mon {
  --c1: #fcd34d;
  --c2: #0b0d14;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq08-mon {
  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: 17em;
  padding: .9em 1em 1em;
  border-radius: 1.3em;
  color: #e7e5df;
  background: radial-gradient(circle at 12% 20%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 88% 14%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 80% 88%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 8% 78%,#fff 0 .8px,transparent 1.2px),var(--c2);
  box-shadow: 0 1.2em 2em -1em rgba(0,0,0,.6);
}

.uvq08-mon .hd {
  margin: 0 0 .6em;
  font: italic .78em/1.2 Georgia,"Times New Roman",serif;
  letter-spacing: .04em;
  opacity: .75;
}

.uvq08-mon .mn {
  position: relative;
  width: 11.5em;
  height: 11.5em;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 53%,rgba(255,255,255,.75) 0 .2em,rgba(70,70,70,.5) .26em .36em,transparent .42em),radial-gradient(circle at 45% 81%,rgba(255,255,255,.85) 0 .18em,rgba(70,70,70,.45) .24em .32em,transparent .38em),radial-gradient(circle at 72% 66%,rgba(70,70,70,.35) 0 .15em,transparent .22em),radial-gradient(circle at 26% 70%,rgba(70,70,70,.3) 0 .2em,transparent .28em),repeating-conic-gradient(from 0deg at 45% 81%,rgba(255,255,255,.1) 0 2deg,transparent 2deg 16deg),radial-gradient(ellipse 26% 22% at 36% 30%,rgba(88,90,98,.6) 0 55%,transparent 75%),radial-gradient(ellipse 15% 14% at 58% 30%,rgba(88,90,98,.62) 0 55%,transparent 75%),radial-gradient(ellipse 17% 15% at 63% 47%,rgba(88,90,98,.58) 0 55%,transparent 75%),radial-gradient(ellipse 17% 30% at 20% 52%,rgba(88,90,98,.45) 0 50%,transparent 75%),radial-gradient(ellipse 10% 13% at 77% 60%,rgba(88,90,98,.5) 0 50%,transparent 75%),radial-gradient(ellipse 14% 10% at 42% 64%,rgba(88,90,98,.45) 0 50%,transparent 75%),radial-gradient(circle at 38% 35%,#f1f0ea,#c9c8c2 55%,#8f8e8a 100%);
  box-shadow: inset -1.1em -.7em 2em rgba(0,0,0,.5),0 0 2.5em rgba(255,250,230,.12);
}

.uvq08-mon .ft {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  z-index: 1;
  width: max(1.7em,var(--s));
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px dashed transparent;
  transition: border-color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-mon .ft:hover {
  border-color: color-mix(in srgb,var(--c1) 55%,transparent);
}

.uvq08-mon .ft:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq08-mon .ft:active {
  scale: .94;
}

.uvq08-mon .ft:is(:hover,:focus-visible,.pk) {
  z-index: 3;
  border-color: var(--c1);
  background: color-mix(in srgb,var(--c1) 14%,transparent);
  animation: uvq08-mon-in calc(0.4s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-mon .tt {
  position: absolute;
  left: 50%;
  z-index: 3;
  display: grid;
  gap: .15em;
  width: max-content;
  max-width: 10.5em;
  padding: .5em .7em;
  translate: -50% 0;
  border-radius: .5em;
  font-size: .72em;
  line-height: 1.3;
  text-align: left;
  color: #f3f1ea;
  background: rgba(12,14,22,.9);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--c1) 35%,transparent),0 .8em 1.4em -.6em rgba(0,0,0,.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-mon .up .tt {
  bottom: calc(100% + .35em);
}

.uvq08-mon .dn .tt {
  top: calc(100% + .35em);
}

.uvq08-mon .tt b {
  font: 700 1.08em/1.2 Georgia,"Times New Roman",serif;
}

.uvq08-mon .tt code {
  font: 700 .85em/1.3 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: var(--c1);
}

.uvq08-mon .tt span {
  opacity: .8;
}

.uvq08-mon .ft:is(:hover,:focus-visible,.pk) .tt {
  opacity: 1;
  visibility: visible;
}

@keyframes uvq08-mon-in {
  0% {
    scale: 1.5;
    opacity: .3;
  }
  100% {
    scale: 1;
    opacity: 1;
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq08-mon").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-mon {
  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: 17em;
  padding: .9em 1em 1em;
  border-radius: 1.3em;
  color: #e7e5df;
  background: radial-gradient(circle at 12% 20%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 88% 14%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 80% 88%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 8% 78%,#fff 0 .8px,transparent 1.2px),var(--c2);
  box-shadow: 0 1.2em 2em -1em rgba(0,0,0,.6);
}

.uvq08-mon .hd {
  margin: 0 0 .6em;
  font: italic .78em/1.2 Georgia,"Times New Roman",serif;
  letter-spacing: .04em;
  opacity: .75;
}

.uvq08-mon .mn {
  position: relative;
  width: 11.5em;
  height: 11.5em;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 53%,rgba(255,255,255,.75) 0 .2em,rgba(70,70,70,.5) .26em .36em,transparent .42em),radial-gradient(circle at 45% 81%,rgba(255,255,255,.85) 0 .18em,rgba(70,70,70,.45) .24em .32em,transparent .38em),radial-gradient(circle at 72% 66%,rgba(70,70,70,.35) 0 .15em,transparent .22em),radial-gradient(circle at 26% 70%,rgba(70,70,70,.3) 0 .2em,transparent .28em),repeating-conic-gradient(from 0deg at 45% 81%,rgba(255,255,255,.1) 0 2deg,transparent 2deg 16deg),radial-gradient(ellipse 26% 22% at 36% 30%,rgba(88,90,98,.6) 0 55%,transparent 75%),radial-gradient(ellipse 15% 14% at 58% 30%,rgba(88,90,98,.62) 0 55%,transparent 75%),radial-gradient(ellipse 17% 15% at 63% 47%,rgba(88,90,98,.58) 0 55%,transparent 75%),radial-gradient(ellipse 17% 30% at 20% 52%,rgba(88,90,98,.45) 0 50%,transparent 75%),radial-gradient(ellipse 10% 13% at 77% 60%,rgba(88,90,98,.5) 0 50%,transparent 75%),radial-gradient(ellipse 14% 10% at 42% 64%,rgba(88,90,98,.45) 0 50%,transparent 75%),radial-gradient(circle at 38% 35%,#f1f0ea,#c9c8c2 55%,#8f8e8a 100%);
  box-shadow: inset -1.1em -.7em 2em rgba(0,0,0,.5),0 0 2.5em rgba(255,250,230,.12);
}

.uvq08-mon .ft {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  z-index: 1;
  width: max(1.7em,var(--s));
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px dashed transparent;
  transition: border-color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-mon .ft:hover {
  border-color: color-mix(in srgb,var(--c1) 55%,transparent);
}

.uvq08-mon .ft:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq08-mon .ft:active {
  scale: .94;
}

.uvq08-mon .ft:is(:hover,:focus-visible,.pk) {
  z-index: 3;
  border-color: var(--c1);
  background: color-mix(in srgb,var(--c1) 14%,transparent);
  animation: uvq08-mon-in calc(0.4s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-mon .tt {
  position: absolute;
  left: 50%;
  z-index: 3;
  display: grid;
  gap: .15em;
  width: max-content;
  max-width: 10.5em;
  padding: .5em .7em;
  translate: -50% 0;
  border-radius: .5em;
  font-size: .72em;
  line-height: 1.3;
  text-align: left;
  color: #f3f1ea;
  background: rgba(12,14,22,.9);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--c1) 35%,transparent),0 .8em 1.4em -.6em rgba(0,0,0,.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-mon .up .tt {
  bottom: calc(100% + .35em);
}

.uvq08-mon .dn .tt {
  top: calc(100% + .35em);
}

.uvq08-mon .tt b {
  font: 700 1.08em/1.2 Georgia,"Times New Roman",serif;
}

.uvq08-mon .tt code {
  font: 700 .85em/1.3 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: var(--c1);
}

.uvq08-mon .tt span {
  opacity: .8;
}

.uvq08-mon .ft:is(:hover,:focus-visible,.pk) .tt {
  opacity: 1;
  visibility: visible;
}

@keyframes uvq08-mon-in {
  0% {
    scale: 1.5;
    opacity: .3;
  }
  100% {
    scale: 1;
    opacity: 1;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq08-mon,.uvq08-mon *,.uvq08-mon *::before,.uvq08-mon *::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 TipLunarAtlas() {
  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": "#fcd34d",
          "--c2": "#0b0d14",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq08-mon" role="group" aria-label="Near side of the Moon"><p className="hd" aria-hidden="true">Near side of the Moon</p><div className="mn"><button type="button" className="ft f0 dn pk" style={{ left: "63%", top: "47%", "--s": "17%" } as CSSProperties} aria-label="Sea of Tranquility" aria-describedby="uvq08-mon-0"><span className="tt" role="tooltip" id="uvq08-mon-0"><b>Sea of Tranquility</b><code>Mare · 873 km</code><span>Apollo 11 landed here in 1969</span></span></button><button type="button" className="ft f1 dn" style={{ left: "58%", top: "30%", "--s": "14%" } as CSSProperties} aria-label="Sea of Serenity" aria-describedby="uvq08-mon-1"><span className="tt" role="tooltip" id="uvq08-mon-1"><b>Sea of Serenity</b><code>Mare · 707 km</code><span>Smooth, dark basalt lava</span></span></button><button type="button" className="ft f2 dn" style={{ left: "36%", top: "30%", "--s": "22%" } as CSSProperties} aria-label="Sea of Showers" aria-describedby="uvq08-mon-2"><span className="tt" role="tooltip" id="uvq08-mon-2"><b>Sea of Showers</b><code>Mare · 1,146 km</code><span>The largest sea on the near side</span></span></button><button type="button" className="ft f3 up" style={{ left: "33%", top: "53%", "--s": "7%" } as CSSProperties} aria-label="Copernicus" aria-describedby="uvq08-mon-3"><span className="tt" role="tooltip" id="uvq08-mon-3"><b>Copernicus</b><code>Crater · 93 km</code><span>Its rays shine at full moon</span></span></button><button type="button" className="ft f4 up" style={{ left: "45%", top: "81%", "--s": "6%" } as CSSProperties} aria-label="Tycho" aria-describedby="uvq08-mon-4"><span className="tt" role="tooltip" id="uvq08-mon-4"><b>Tycho</b><code>Crater · 85 km</code><span>Young: about 108 million years old</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 “Lunar atlas tooltip” block (Tooltips) from AIMRAN Library to my project.

## What it is
The near side of the Moon with its seas and craters marked: each gets a ring at its real size and opens its card.

## Chosen settings
- Main color: #fcd34d
- Secondary color: #0b0d14
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Cara visible de la Luna"

## 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-mon {
  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: 17em;
  padding: .9em 1em 1em;
  border-radius: 1.3em;
  color: #e7e5df;
  background: radial-gradient(circle at 12% 20%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 88% 14%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 80% 88%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 8% 78%,#fff 0 .8px,transparent 1.2px),var(--c2);
  box-shadow: 0 1.2em 2em -1em rgba(0,0,0,.6);
}

.uvq08-mon .hd {
  margin: 0 0 .6em;
  font: italic .78em/1.2 Georgia,"Times New Roman",serif;
  letter-spacing: .04em;
  opacity: .75;
}

.uvq08-mon .mn {
  position: relative;
  width: 11.5em;
  height: 11.5em;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 53%,rgba(255,255,255,.75) 0 .2em,rgba(70,70,70,.5) .26em .36em,transparent .42em),radial-gradient(circle at 45% 81%,rgba(255,255,255,.85) 0 .18em,rgba(70,70,70,.45) .24em .32em,transparent .38em),radial-gradient(circle at 72% 66%,rgba(70,70,70,.35) 0 .15em,transparent .22em),radial-gradient(circle at 26% 70%,rgba(70,70,70,.3) 0 .2em,transparent .28em),repeating-conic-gradient(from 0deg at 45% 81%,rgba(255,255,255,.1) 0 2deg,transparent 2deg 16deg),radial-gradient(ellipse 26% 22% at 36% 30%,rgba(88,90,98,.6) 0 55%,transparent 75%),radial-gradient(ellipse 15% 14% at 58% 30%,rgba(88,90,98,.62) 0 55%,transparent 75%),radial-gradient(ellipse 17% 15% at 63% 47%,rgba(88,90,98,.58) 0 55%,transparent 75%),radial-gradient(ellipse 17% 30% at 20% 52%,rgba(88,90,98,.45) 0 50%,transparent 75%),radial-gradient(ellipse 10% 13% at 77% 60%,rgba(88,90,98,.5) 0 50%,transparent 75%),radial-gradient(ellipse 14% 10% at 42% 64%,rgba(88,90,98,.45) 0 50%,transparent 75%),radial-gradient(circle at 38% 35%,#f1f0ea,#c9c8c2 55%,#8f8e8a 100%);
  box-shadow: inset -1.1em -.7em 2em rgba(0,0,0,.5),0 0 2.5em rgba(255,250,230,.12);
}

.uvq08-mon .ft {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  z-index: 1;
  width: max(1.7em,var(--s));
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px dashed transparent;
  transition: border-color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-mon .ft:hover {
  border-color: color-mix(in srgb,var(--c1) 55%,transparent);
}

.uvq08-mon .ft:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq08-mon .ft:active {
  scale: .94;
}

.uvq08-mon .ft:is(:hover,:focus-visible,.pk) {
  z-index: 3;
  border-color: var(--c1);
  background: color-mix(in srgb,var(--c1) 14%,transparent);
  animation: uvq08-mon-in calc(0.4s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-mon .tt {
  position: absolute;
  left: 50%;
  z-index: 3;
  display: grid;
  gap: .15em;
  width: max-content;
  max-width: 10.5em;
  padding: .5em .7em;
  translate: -50% 0;
  border-radius: .5em;
  font-size: .72em;
  line-height: 1.3;
  text-align: left;
  color: #f3f1ea;
  background: rgba(12,14,22,.9);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--c1) 35%,transparent),0 .8em 1.4em -.6em rgba(0,0,0,.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-mon .up .tt {
  bottom: calc(100% + .35em);
}

.uvq08-mon .dn .tt {
  top: calc(100% + .35em);
}

.uvq08-mon .tt b {
  font: 700 1.08em/1.2 Georgia,"Times New Roman",serif;
}

.uvq08-mon .tt code {
  font: 700 .85em/1.3 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: var(--c1);
}

.uvq08-mon .tt span {
  opacity: .8;
}

.uvq08-mon .ft:is(:hover,:focus-visible,.pk) .tt {
  opacity: 1;
  visibility: visible;
}

@keyframes uvq08-mon-in {
  0% {
    scale: 1.5;
    opacity: .3;
  }
  100% {
    scale: 1;
    opacity: 1;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq08-mon,.uvq08-mon *,.uvq08-mon *::before,.uvq08-mon *::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 TipLunarAtlas() {
  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": "#fcd34d",
          "--c2": "#0b0d14",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq08-mon" role="group" aria-label="Near side of the Moon"><p className="hd" aria-hidden="true">Near side of the Moon</p><div className="mn"><button type="button" className="ft f0 dn pk" style={{ left: "63%", top: "47%", "--s": "17%" } as CSSProperties} aria-label="Sea of Tranquility" aria-describedby="uvq08-mon-0"><span className="tt" role="tooltip" id="uvq08-mon-0"><b>Sea of Tranquility</b><code>Mare · 873 km</code><span>Apollo 11 landed here in 1969</span></span></button><button type="button" className="ft f1 dn" style={{ left: "58%", top: "30%", "--s": "14%" } as CSSProperties} aria-label="Sea of Serenity" aria-describedby="uvq08-mon-1"><span className="tt" role="tooltip" id="uvq08-mon-1"><b>Sea of Serenity</b><code>Mare · 707 km</code><span>Smooth, dark basalt lava</span></span></button><button type="button" className="ft f2 dn" style={{ left: "36%", top: "30%", "--s": "22%" } as CSSProperties} aria-label="Sea of Showers" aria-describedby="uvq08-mon-2"><span className="tt" role="tooltip" id="uvq08-mon-2"><b>Sea of Showers</b><code>Mare · 1,146 km</code><span>The largest sea on the near side</span></span></button><button type="button" className="ft f3 up" style={{ left: "33%", top: "53%", "--s": "7%" } as CSSProperties} aria-label="Copernicus" aria-describedby="uvq08-mon-3"><span className="tt" role="tooltip" id="uvq08-mon-3"><b>Copernicus</b><code>Crater · 93 km</code><span>Its rays shine at full moon</span></span></button><button type="button" className="ft f4 up" style={{ left: "45%", top: "81%", "--s": "6%" } as CSSProperties} aria-label="Tycho" aria-describedby="uvq08-mon-4"><span className="tt" role="tooltip" id="uvq08-mon-4"><b>Tycho</b><code>Crater · 85 km</code><span>Young: about 108 million years old</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.
````
