
.ov {
  --ov-ink: #150d2b;
  --ov-muted: #5b5670;
  --ov-line: rgba(21, 13, 43, 0.14);
  --ov-violet: oklch(0.53 0.205 292);
  margin: 0;
}
.ov-frame { position: relative; overflow: hidden; border-radius: 6px; background: #f4f4f6; }
.ov-stage {
  position: relative;
  transform-origin: var(--ov-fx, 50%) var(--ov-fy, 50%);
  transform: scale(calc(1 + var(--ov-z, 0) * var(--ov-p, 0)));
}
.ov-stage img { display: block; width: 100%; height: auto; }

.ov-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ov-lead { stroke: var(--ov-ink); stroke-width: 0.12; stroke-dasharray: 1 1; stroke-dashoffset: 0; opacity: 0.7; }
.ov-halo { fill: #fff; opacity: 0.9; }
.ov-dot { fill: var(--ov-ink); }
.ov-pin.is-accent .ov-dot { fill: var(--ov-violet); }

.ov-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: baseline; gap: 6px;
  width: max-content; max-width: 260px;
  padding: 8px 11px;
  font: 500 14px/1.35 "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ov-ink); background: #fff; text-align: left;
  border: 1px solid var(--ov-line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(21, 13, 43, 0.08);
  transform: translate(var(--tx), var(--ty));
}
button.ov-chip { cursor: pointer; }
button.ov-chip::after { content: "+"; font-weight: 700; color: var(--ov-violet); }
button.ov-chip[aria-expanded="true"]::after { content: "\2212"; }
button.ov-chip:focus-visible { outline: 2px solid var(--ov-violet); outline-offset: 2px; }
.ov-up { --tx: -50%; --ty: -100%; }
.ov-down { --tx: -50%; --ty: 0%; }
.ov-left { --tx: -100%; --ty: -50%; }
.ov-right { --tx: 0%; --ty: -50%; }

.ov-tag {
  position: absolute; z-index: 2; transform: translate(-50%, 0);
  font: 500 11px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ov-ink); white-space: nowrap;
}
.ov-tag.is-accent { color: var(--ov-violet); }

.ov-note {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 3;
  width: 300px; max-width: 70vw;
  padding: 12px 14px;
  font: 400 14px/1.5 "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ov-ink); background: #fff;
  border: 1px solid var(--ov-line); border-radius: 8px;
  box-shadow: 0 12px 32px rgba(21, 13, 43, 0.14);
  opacity: 0; visibility: hidden;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
  pointer-events: none;
}
.ov-left .ov-note { left: auto; right: 0; }
.ov-chip[aria-expanded="true"] .ov-note { opacity: 1; visibility: visible; transition-delay: 0s; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  button.ov-chip:hover .ov-note { opacity: 1; visibility: visible; transition-delay: 0s; }
}

.ov figcaption { margin-top: 12px; font-size: 14px; color: var(--ov-muted); }
.ov-legend { margin: 8px 0 0; padding-left: 1.2em; font-size: 14px; color: var(--ov-muted); }
.ov-legend li { margin: 4px 0; }
.ov-legend b { color: var(--ov-ink); font-weight: 600; }
.ov-js .ov-legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


@media (max-width: 640px) {
  .ov-chip { width: 24px; height: 24px; padding: 0; justify-content: center; align-items: center; border-radius: 50%; font-size: 12px; }
  .ov-chip .ov-t, .ov-chip .ov-note, button.ov-chip::after { display: none; }
  .ov-chip::before { content: attr(data-n); }
  .ov-tag { font-size: 9px; letter-spacing: 0.04em; }
  .ov-js .ov-legend { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
}


.ov-js .ov .ov-lead { transition: stroke-dashoffset 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0s) + 0.15s); }
.ov-js .ov .ov-dot, .ov-js .ov .ov-halo { transition: opacity 0.3s ease var(--d, 0s); }
.ov-js .ov .ov-chip, .ov-js .ov .ov-tag { transition: opacity 0.4s ease calc(var(--d, 0s) + 0.45s); }
.ov-js .ov:not(.ov-on) .ov-lead { stroke-dashoffset: 1; }
.ov-js .ov:not(.ov-on) .ov-dot, .ov-js .ov:not(.ov-on) .ov-halo, .ov-js .ov:not(.ov-on) .ov-chip, .ov-js .ov:not(.ov-on) .ov-tag { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .ov-stage { transform: none; }
  .ov-js .ov .ov-lead, .ov-js .ov .ov-dot, .ov-js .ov .ov-halo, .ov-js .ov .ov-chip, .ov-js .ov .ov-tag { transition: none; }
}
