/* Animated Hotspots — Public-Viewer DOM-Layer.
   Spiegelt die styles aus
     frontend/src/components/viewer/hotspots-animated/MarkerTextOverlay.tsx (styled-jsx)
   Tokens kommen aus viewer-tokens.css (--vp-hs-*). */

.vp-hs-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.vp-hs-overlay > * { pointer-events: auto; }
/* Marke ausserhalb des Bildes (data-vp-off, gesetzt in tick()): nicht malen,
   Bewegungen anhalten — sie laufen beim Zurueckdrehen an derselben Stelle
   weiter. Ohne das tickten bis zu 21 CSS-Animationen unsichtbar mit
   (gemessen +15..18 ms/s Style-Neuberechnung nach jedem Szenenwechsel). */
.vp-hs-overlay [data-vp-off="1"] { visibility: hidden; }
.vp-hs-overlay [data-vp-off="1"] *,
.vp-hs-overlay [data-vp-off="1"] *::before,
.vp-hs-overlay [data-vp-off="1"] *::after { animation-play-state: paused !important; }

/* ── ICON Anchor + Heroicons-i + Hover-Card ──────────────────────── */
.vp-hs-info-anchor {
    --s: var(--vp-hs-scale, 1);
    position: absolute;
    left: 0;
    top: 0;
    width: calc(44px * var(--s));
    height: calc(44px * var(--s));
    pointer-events: auto;
    cursor: pointer;
    will-change: transform, opacity;
}
/* Zentrierung ueber inset+margin statt transform: das transform des
   Piktogramms gehoert den Bewegungsmustern (markerMotion.ts). Bei fester
   Groesse ist margin:auto pixelgleich zum frueheren translate(-50%,-50%). */
.vp-hs-info-glyph {
    position: absolute;
    inset: 0;
    margin: auto;
    width: calc(33px * var(--s));
    height: calc(33px * var(--s));
    color: var(--vp-hs-ink);
    pointer-events: none;
    z-index: 1;
}
/* Frei gewaehltes Piktogramm: exakt dieselbe Box wie das Standard-Glyph, damit
   Hit-Area und Card-Abstand unveraendert bleiben. `contain` verhindert
   Verzerrung; die Farbe kommt aus der Datei, nicht aus --vp-hs-ink. */
img.vp-hs-info-glyph {
    object-fit: contain;
}
/* PLAIN — die schlichte Form: der Shader zeichnet keine Scheibe, das
   Piktogramm steht frei im Panorama. Ohne dunkle Flaeche darunter faellt die
   Lesbarkeit auf den Bildinhalt zurueck; ein helles Symbol vor heller Wand
   verschwindet. Deshalb ein weicher Schlagschatten statt einer Scheibe — er
   kostet keine sichtbare Flaeche und traegt jedes Icon, auch farbige. Der
   Glyph wird etwas groesser, weil ihn kein Scheibenrand mehr begrenzt und die
   Trefferflaeche (44px) gleich bleibt. */
.vp-hs-plain .vp-hs-info-glyph {
    width: calc(38px * var(--s));
    height: calc(38px * var(--s));
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55))
            drop-shadow(0 0 6px rgba(0, 0, 0, 0.35));
}
.vp-hs-info-card {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translateX(-50%) translateY(8px);
    transform-origin: bottom center;
    width: 236px;
    background: var(--vp-hs-glass-strong);
    -webkit-backdrop-filter: var(--vp-hs-blur);
    backdrop-filter: var(--vp-hs-blur);
    border: 1px solid var(--vp-hs-glass-line);
    border-radius: 14px;
    box-shadow: var(--vp-hs-sh);
    padding: 14px 16px;
    opacity: 0;
    /* Unsichtbar auch fuer den Compositor: eine opacity-0-Karte mit
       backdrop-filter wird sonst bei jedem Bild weichgezeichnet. Die
       Transition (all) schaltet visibility diskret am richtigen Ende um,
       die Ueberblendung bleibt gleich. */
    visibility: hidden;
    pointer-events: none;
    transition: 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 2;
}
.vp-hs-info-anchor:hover .vp-hs-info-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.vp-hs-info-card::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 9px;
    margin-top: -1px;
    /* Gleiche Fuellung wie die Karte (folgt Theme und Hotspot-Theme);
       vorher fest #171c28 bzw. #f7f9fb nur bei .vp-light. */
    background: var(--vp-hs-glass-strong);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.vp-hs-info-card .eye {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vp-hs-ink-dim);
    margin: 0;
}
.vp-hs-info-card h4 {
    margin: 4px 0 5px;
    font-family: "Onest", system-ui, sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--vp-hs-ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.vp-hs-info-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--vp-hs-ink-dim);
}

/* ── Expanded ICON-Card (click-mode, smart-placement) ────────────── */
/* Eigene Ebene ueber der Oberflaeche. Die Karte lag bisher im Hotspot-Overlay (z-index 1, eigener Stapelkontext) und damit UNTER Dock,
   Karte, Rail und Titelleiste. Die Ebene liegt ueber Dock (30), Minikarte (31) und Hover-Fenster (42), unter Etagen-Liste (60), Hilfe
   (9000) und Dialogen. Sie sitzt im selben Container wie die Oberflaeche (#app), nicht in #viewer: dort wirkt der Farbfilter der Tour
   (colorGrading) und faerbte die Karte ein. */
.vp-hs-card-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 45;
}
.vp-hs-info-expanded {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 442px;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: min(calc(100% - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)), calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    background: var(--vp-hs-glass-strong);
    -webkit-backdrop-filter: var(--vp-hs-blur);
    backdrop-filter: var(--vp-hs-blur);
    border: 1px solid var(--vp-hs-glass-line);
    border-radius: 16px;
    box-shadow: var(--vp-hs-sh);
    padding: 18px 20px 20px;
    pointer-events: auto;
    cursor: default;
    z-index: 10;
    color: var(--vp-hs-ink);
    animation: vp-hs-expand-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.vp-hs-info-expanded.is-relayout { visibility: hidden; animation: none; }
@keyframes vp-hs-expand-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.vp-hs-info-expanded[data-arrow-side="left"]::before {
    content: "";
    position: absolute;
    top: var(--arrow-y, 50%);
    left: 0;
    transform: translate(-100%, -50%);
    width: 11px;
    height: 22px;
    margin-left: 1px;
    background: var(--vp-hs-glass-strong);
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
}
.vp-hs-info-expanded[data-arrow-side="right"]::before {
    content: "";
    position: absolute;
    top: var(--arrow-y, 50%);
    right: 0;
    transform: translate(100%, -50%);
    width: 11px;
    height: 22px;
    margin-right: 1px;
    background: var(--vp-hs-glass-strong);
    clip-path: polygon(0 0, 0 100%, 100% 50%);
}

/* Aufbau: .close, dann .vp-ic-grid mit .vp-ic-media (Bild/Video) und .vp-ic-body (Text; NUR dieser Teil scrollt). */
.vp-ic-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.vp-ic-media {
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 14px;
    background: rgba(0, 0, 0, 0.20);
}
.vp-ic-media img.vp-ic-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}
.vp-ic-media.is-port img.vp-ic-img { object-position: 50% 30%; }
.vp-ic-media video.vp-ic-vid {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.vp-ic-body {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.vp-hs-info-expanded .eye {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vp-hs-ink-dim);
    margin: 0;
}
.vp-hs-info-expanded h3 {
    margin: 6px 0 8px;
    font-family: "Onest", system-ui, sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--vp-hs-ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
    padding-right: 40px;
    overflow-wrap: anywhere;
}
.vp-hs-info-expanded p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--vp-hs-ink-dim);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
/* Ohne Bild: nur Text, schmaler */
.vp-hs-info-expanded.is-text { width: 360px; }

/* A) Querformat (B/H > 1,15, auch 21:9): Bild oben, 200 px hoch, cover — wie bisher. Ladezustand (is-pending) nutzt dieselben Masse,
   so entsteht beim Normalfall kein Sprung. */
.vp-hs-info-expanded.is-land .vp-ic-media,
.vp-hs-info-expanded.is-pending .vp-ic-media { height: 200px; }

/* B/D) Hochformat und Quadrat: Bild links, Text rechts. Verhaeltnis (--vp-ic-ar) ist auf 0,62-0,9 geklammert (Quadrat 1). */
.vp-hs-info-expanded.is-port,
.vp-hs-info-expanded.is-square { width: min(600px, calc(100% - 24px)); }
.vp-hs-info-expanded.is-port .vp-ic-grid,
.vp-hs-info-expanded.is-square .vp-ic-grid { flex-direction: row; gap: 18px; align-items: flex-start; }
.vp-hs-info-expanded.is-port .vp-ic-media,
.vp-hs-info-expanded.is-square .vp-ic-media {
    margin-bottom: 0;
    width: min(var(--vp-ic-img-w, 200px), calc((100vh - 24px - 60px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--vp-ic-ar, 0.75)));
    width: min(var(--vp-ic-img-w, 200px), calc((100dvh - 24px - 60px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--vp-ic-ar, 0.75)));
    aspect-ratio: var(--vp-ic-ar, 0.75);
}
.vp-hs-info-expanded.is-port .vp-ic-body,
.vp-hs-info-expanded.is-square .vp-ic-body { flex: 1 1 auto; align-self: stretch; }

/* Audio und Link gehoerten bisher nur zum alten #infoPanel. Ohne sie waere die
   Vereinheitlichung auf diese Karte ein Datenverlust. */
.vp-hs-info-expanded audio.media-audio {
    display: block;
    width: 100%;
    margin-top: 14px;
}
.vp-hs-info-expanded .link {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: var(--vp-txt-h, 36px);
    margin-top: 14px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--vp-hs-glass-line);
    color: var(--vp-hs-ink);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.vp-hs-info-expanded .link:hover { background: rgba(255,255,255,0.13); }
:root.vp-light .vp-hs-info-expanded .link,
.vp-light .vp-hs-info-expanded .link { background: rgba(0,0,0,0.04); }
:root.vp-light .vp-hs-info-expanded .link:hover,
.vp-light .vp-hs-info-expanded .link:hover { background: rgba(0,0,0,0.08); }
.vp-hs-info-expanded .link:focus-visible,
.vp-hs-info-expanded .close:focus-visible,
.vp-ic-zoom:focus-visible,
.vp-ic-lb-close:focus-visible { outline: 2px solid var(--vp-ctl-focus, #3b82f6); outline-offset: 2px; }

/* Schliessen = Icon-Knopf S (32, Touch 40, Radius 10, Icon 16 / 1.7) */
.vp-hs-info-expanded .close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: var(--vp-ctl-s, 32px);
    height: var(--vp-ctl-s, 32px);
    border-radius: var(--vp-ctl-r-s, 10px);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--vp-hs-glass-line);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--vp-hs-ink);
    transition: background-color 0.15s, transform 0.12s;
    padding: 0;
    z-index: 3;
}
.vp-hs-info-expanded .close svg { width: 16px; height: 16px; stroke-width: 1.7; }
.vp-hs-info-expanded .close:active { transform: scale(0.94); }
:root.vp-light .vp-hs-info-expanded .close,
.vp-light .vp-hs-info-expanded .close,
body.light .vp-hs-info-expanded .close {
    background: rgba(0,0,0,0.04);
}
.vp-hs-info-expanded .close:hover { background: rgba(255,255,255,0.13); }
:root.vp-light .vp-hs-info-expanded .close:hover,
.vp-light .vp-hs-info-expanded .close:hover,
body.light .vp-hs-info-expanded .close:hover { background: rgba(0,0,0,0.08); }
/* Liegt das Bild OBEN (Querformat oder Ladezustand, genug Hoehe), sitzt der Knopf auf dem Bild: dunkle Glasflaeche, weisses Kreuz,
   auf jedem Foto lesbar. Bei Hoehe <= 480 steht das Bild links und der Knopf bleibt am Kartenrand. */
@media (min-height: 481px) {
    .vp-hs-info-expanded.vp-hs-info-expanded.is-land .close,
    .vp-hs-info-expanded.vp-hs-info-expanded.is-pending .close {
        top: 24px;
        right: 26px;
        background: rgba(12,14,20,0.62);
        border-color: rgba(255,255,255,0.32);
        color: #fff;
        box-shadow: 0 1px 6px rgba(0,0,0,0.35);
    }
    .vp-hs-info-expanded.vp-hs-info-expanded.is-land .close:hover,
    .vp-hs-info-expanded.vp-hs-info-expanded.is-pending .close:hover { background: rgba(12,14,20,0.82); }
}

/* Vergroessern (Lightbox) = Icon-Knopf S auf dem Bild, unten rechts */
.vp-ic-zoom {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: var(--vp-ctl-s, 32px);
    height: var(--vp-ctl-s, 32px);
    border-radius: var(--vp-ctl-r-s, 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12,14,20,0.62);
    border: 1px solid rgba(255,255,255,0.32);
    color: #fff;
    padding: 0;
    cursor: zoom-in;
}
.vp-ic-zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Handy hoch: Karte nutzt die Fensterbreite (minus 12 je Seite); Bild links 38 %, Text rechts, etwas kompakter. */
@media (max-width: 640px) {
    .vp-hs-info-expanded { padding: 14px; }
    .vp-hs-info-expanded.is-land,
    .vp-hs-info-expanded.is-pending,
    .vp-hs-info-expanded.is-text { width: min(360px, calc(100% - 24px)); }
    .vp-hs-info-expanded.is-port,
    .vp-hs-info-expanded.is-square { width: calc(100% - 24px); --vp-ic-img-w: 38%; }
    .vp-hs-info-expanded.is-port .vp-ic-grid,
    .vp-hs-info-expanded.is-square .vp-ic-grid { gap: 12px; }
    .vp-hs-info-expanded.is-port .close,
    .vp-hs-info-expanded.is-square .close,
    .vp-hs-info-expanded.is-text .close { top: 6px; right: 6px; }
    .vp-hs-info-expanded.is-port h3,
    .vp-hs-info-expanded.is-square h3 { font-size: 15px; }
    .vp-hs-info-expanded.is-port p,
    .vp-hs-info-expanded.is-square p { font-size: 12.5px; }
}
/* Handy quer / wenig Hoehe: IMMER nebeneinander, kompakt, Bild nie hoeher als die Karte. */
@media (max-height: 480px) {
    .vp-hs-info-expanded { padding: 12px 14px; }
    .vp-hs-info-expanded.is-land,
    .vp-hs-info-expanded.is-pending,
    .vp-hs-info-expanded.is-port,
    .vp-hs-info-expanded.is-square { width: min(560px, calc(100% - 24px)); }
    .vp-hs-info-expanded.is-land .vp-ic-grid,
    .vp-hs-info-expanded.is-pending .vp-ic-grid { flex-direction: row; gap: 14px; align-items: flex-start; }
    .vp-hs-info-expanded.is-port .vp-ic-grid,
    .vp-hs-info-expanded.is-square .vp-ic-grid { gap: 14px; }
    .vp-hs-info-expanded.is-land .vp-ic-media,
    .vp-hs-info-expanded.is-pending .vp-ic-media,
    .vp-hs-info-expanded.is-port .vp-ic-media,
    .vp-hs-info-expanded.is-square .vp-ic-media {
        margin-bottom: 0;
        height: auto;
        width: min(42%, calc((100vh - 24px - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--vp-ic-ar, 1.6)));
        width: min(42%, calc((100dvh - 24px - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--vp-ic-ar, 1.6)));
        aspect-ratio: var(--vp-ic-ar, 1.6);
    }
    .vp-hs-info-expanded.is-land .vp-ic-body,
    .vp-hs-info-expanded.is-pending .vp-ic-body { flex: 1 1 auto; align-self: stretch; }
    .vp-hs-info-expanded.is-text { width: min(420px, calc(100% - 24px)); }
    .vp-hs-info-expanded .close,
    .vp-hs-info-expanded.is-land .close,
    .vp-hs-info-expanded.is-pending .close { top: 6px; right: 6px; }
    .vp-hs-info-expanded h3 { font-size: 16px; }
}

/* Lightbox: Tipp auf das Bild zeigt es ganz (contain). Liegt ueber der Karte und allem ausser Hilfe/Dialogen (9000). */
.vp-ic-lb {
    position: absolute;
    inset: 0;
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    background: rgba(6, 8, 12, 0.92);
    cursor: zoom-out;
    animation: vp-hs-expand-in 0.18s ease;
}
.vp-ic-lb img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}
.vp-ic-lb-close {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    width: var(--vp-ctl-s, 32px);
    height: var(--vp-ctl-s, 32px);
    border-radius: var(--vp-ctl-r-s, 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12,14,20,0.62);
    border: 1px solid rgba(255,255,255,0.32);
    color: #fff;
    padding: 0;
    cursor: pointer;
}
.vp-ic-lb-close svg { width: 16px; height: 16px; stroke-width: 1.7; }

@media (prefers-reduced-motion: reduce) {
    .vp-hs-info-expanded, .vp-ic-lb { animation: none; }
}

/* ── TAG-Pille (always-on, komplett DOM) ─────────────────────────── */
.vp-hs-tag-pill {
    --s: var(--vp-hs-scale, 1);
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: calc(6px * var(--s));
    padding: calc(6px * var(--s)) calc(12px * var(--s)) calc(6px * var(--s)) calc(8px * var(--s));
    background: var(--vp-hs-glass-strong);
    -webkit-backdrop-filter: var(--vp-hs-blur);
    backdrop-filter: var(--vp-hs-blur);
    border: 1px solid var(--vp-hs-glass-line);
    border-radius: calc(13px * var(--s));
    box-shadow: var(--vp-hs-sh);
    color: var(--vp-hs-ink);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    pointer-events: auto;
    will-change: transform, opacity;
    transform-origin: bottom center;
}
.vp-hs-tag-pill .pin {
    position: relative; /* Traeger fuer .vp-hs-motion-ring */
    width: calc(22px * var(--s));
    height: calc(22px * var(--s));
    border-radius: calc(6px * var(--s));
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vp-hs-glass);
    border: 1px solid var(--vp-hs-glass-line);
}
.vp-hs-tag-pill .pin svg,
.vp-hs-tag-pill .pin img {
    width: calc(13px * var(--s));
    height: calc(13px * var(--s));
}
/* Frei gewaehltes Icon in der Pille: gleiche Box wie der Standard-Pin,
   contain gegen Verzerrung. */
.vp-hs-tag-pill .pin img {
    object-fit: contain;
}
.vp-hs-tag-pill .txt {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.vp-hs-tag-pill .eye {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: calc(8px * var(--s));
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vp-hs-ink-dim);
}
.vp-hs-tag-pill .ttl {
    font-family: "Onest", system-ui, sans-serif;
    font-weight: 600;
    font-size: calc(13px * var(--s));
    margin-top: calc(1px * var(--s));
    letter-spacing: -0.01em;
}

/* ══ Подписи к точкам ════════════════════════════════════════════════════
   Dauerhafte Beschriftung UNTER der Marke, geschaltet ueber
   toolbarConfig.hotspotLabels = "always". Anders als der Hover-Titel gibt es
   davon viele gleichzeitig; Rangordnung, Ueberlappung und Deckel entscheidet
   hotspots-animated.js, hier steht nur die Optik.
   Wortgleich zu spiegeln nach MarkerTextOverlay.tsx (Editor-Vorschau). */
.vp-hs-caption {
    --s: var(--vp-hs-scale, 1);
    position: absolute;
    left: 0;
    top: 0;
    /* REINER TEXT, keine Pille (User-Entscheidung 2026-09-22). Die Lesbarkeit
       traegt allein der Saum weiter unten — dasselbe Mittel wie bei
       .vp-hs-plain, das sein Piktogramm ohne Glas-Scheibe lesbar haelt. */
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    font-family: "Onest", system-ui, sans-serif;
    font-weight: 600;
    /* UEBERALL GLEICH GROSS (User-Entscheidung 2026-09-22): bewusst OHNE
       var(--s). Die Beschriftung ist Text in der Szene, keine Beschriftung der
       Marke — sie mit iconScale mitwachsen zu lassen ergab in einer Szene mit
       gemischten Markengroessen lauter verschieden grosse Namen.
       Die Marke selbst skaliert weiter, nur ihr Name nicht. */
    font-size: 13px;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--vp-hs-ink);
    /* Zwei Lagen: eine enge, harte fuer die Kante, eine weiche, weite gegen
       unruhigen Untergrund. Der Saum ist gegenfarbig zur Schrift — die Token
       je Thema stehen in viewer-tokens.css. */
    text-shadow:
        0 1px 2px var(--vp-hs-label-halo, rgba(0, 0, 0, 0.78)),
        0 0 6px var(--vp-hs-label-halo, rgba(0, 0, 0, 0.78));
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    will-change: transform, opacity;
    transition: opacity 0.18s ease;
}

/* ══ Hover-Titel an Hotspots ═════════════════════════════════════════════
   Gilt fuer ALLE Marker-Arten, nicht nur die animierten: klassische Marken,
   Flaechen und die animierten Stile teilen sich dieses eine Fenster.
   Das Gegenstueck im Editor steht in
   `frontend/src/components/viewer/three/HotspotTooltip.tsx` — Aenderungen
   hier gehoeren dort ebenfalls hinein, sonst zeigt die Vorschau etwas
   anderes als die fertige Tour.

   Vier Ebenen mit je einer Aufgabe:
     .vp-hs-tip         — die Position am Marker (kein Uebergang, sonst
                          schleppt sich das Fenster beim Drehen hinterher)
     .vp-hs-tip__anchor — das feste Ausrichten (ueber/unter dem Marker)
     .vp-hs-tip__box    — der Kasten: waechst aus der Marke heraus
     .vp-hs-tip__label  — der Text: kommt einen Wimpernschlag spaeter
   Getrennt, damit die Einblendung nie mit der Positionsverfolgung kollidiert.
   Bewegt werden ausschliesslich Transform und Deckkraft — kein Blur (der
   Compositor rechnete ihn sonst pro Bild neu) und keine Groessen. */
.vp-hs-tip {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    --vp-tip-in: 180ms;
    --vp-tip-out: 120ms;
    --vp-tip-stagger: 40ms;
    /* Aufgehen: schnell los, weich aus — ohne Ueberschwingen.
       Zugehen: flach und kurz, es soll wegfallen, nicht zurueckkriechen. */
    --vp-tip-ease-in: cubic-bezier(0.16, 1, 0.3, 1);
    --vp-tip-ease-out: cubic-bezier(0.4, 0, 1, 1);
    --vp-tip-rest-y: 4px;
    --vp-tip-label-y: 3px;
    /* Wachstumspunkt ist die markerseitige Kante — das Fenster kommt damit aus
       der Marke heraus statt daneben zu erscheinen. */
    --vp-tip-origin: bottom center;
}
.vp-hs-tip[data-side="bottom"] {
    --vp-tip-rest-y: -4px;
    --vp-tip-label-y: -3px;
    --vp-tip-origin: top center;
}
/* Eigene Zeichenebene nur solange etwas zu sehen ist. Ein Dauer-Layer fuer ein
   meist unsichtbares Element waere Ballast. */
.vp-hs-tip.is-visible,
.vp-hs-tip.is-closing {
    will-change: transform;
}
.vp-hs-tip__anchor {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -100%);
    pointer-events: none;
}
.vp-hs-tip[data-side="bottom"] .vp-hs-tip__anchor {
    transform: translate(-50%, 0);
}
/* Ruhestellung = Ausgangspunkt des Aufgehens. Ohne Uebergang: hierher kehrt
   das Fenster nur zurueck, wenn es ohnehin schon unsichtbar ist. */
.vp-hs-tip__box {
    display: block;
    max-width: 260px;
    overflow: hidden;
    padding: 7px 11px;
    border-radius: 11px;
    background: var(--vp-hs-glass-strong);
    border: 1px solid var(--vp-hs-glass-line);
    box-shadow: var(--vp-hs-sh);
    -webkit-backdrop-filter: var(--vp-hs-blur);
    backdrop-filter: var(--vp-hs-blur);
    color: var(--vp-hs-ink);
    transform-origin: var(--vp-tip-origin);
    transform: translateY(var(--vp-tip-rest-y)) scale(0.9);
    opacity: 0;
    transition: none;
}
.vp-hs-tip__label {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Onest", system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    transform: translateY(var(--vp-tip-label-y));
    opacity: 0;
    transition: none;
}
/* ── Aufgehen ── */
.vp-hs-tip.is-visible .vp-hs-tip__box {
    transform: translateY(0) scale(1);
    opacity: 1;
    transition: transform var(--vp-tip-in) var(--vp-tip-ease-in),
                opacity var(--vp-tip-in) var(--vp-tip-ease-in);
    will-change: transform, opacity;
}
/* Der Text kommt einen Wimpernschlag nach dem Kasten. */
.vp-hs-tip.is-visible .vp-hs-tip__label {
    transform: translateY(0);
    opacity: 1;
    transition: transform var(--vp-tip-in) var(--vp-tip-ease-in) var(--vp-tip-stagger),
                opacity var(--vp-tip-in) var(--vp-tip-ease-in) var(--vp-tip-stagger);
    will-change: transform, opacity;
}
/* ── Zugehen ── kein Rueckweg, keine Staffelung: alles faellt gemeinsam weg,
   der Kasten schrumpft nur einen Hauch. */
.vp-hs-tip.is-closing .vp-hs-tip__box {
    transform: translateY(0) scale(0.96);
    opacity: 0;
    transition: transform var(--vp-tip-out) var(--vp-tip-ease-out),
                opacity var(--vp-tip-out) var(--vp-tip-ease-out);
    will-change: transform, opacity;
}
.vp-hs-tip.is-closing .vp-hs-tip__label {
    transform: translateY(0);
    opacity: 0;
    transition: opacity var(--vp-tip-out) var(--vp-tip-ease-out);
}
/* Auf schmalen Bildschirmen darf der Titel nicht die halbe Szene zudecken. */
@media (max-width: 640px) {
    .vp-hs-tip__box {
        max-width: 62vw;
        padding: 6px 10px;
    }
    .vp-hs-tip__label {
        font-size: 12px;
    }
}
/* Ohne Zeigergeraet gibt es kein Ueberfahren — dort bleibt das Fenster aus.
   Zweite Absicherung; die Logik in viewer.js prueft dasselbe. */
@media (hover: none) {
    .vp-hs-tip { display: none; }
}
/* Wer wenig Bewegung will, bekommt nur eine Ueberblendung: keine Skalierung,
   kein Versatz, keine Staffelung. */
@media (prefers-reduced-motion: reduce) {
    .vp-hs-tip__box,
    .vp-hs-tip__label,
    .vp-hs-tip.is-visible .vp-hs-tip__box,
    .vp-hs-tip.is-visible .vp-hs-tip__label,
    .vp-hs-tip.is-closing .vp-hs-tip__box,
    .vp-hs-tip.is-closing .vp-hs-tip__label {
        transform: none;
        transition: opacity 0.1s linear;
    }
}

/* >>> Spiegel von markerMotion.ts / MARKER_MOTION_CSS — nicht von Hand aendern >>> */
/* ══ Bewegungsmuster (hotspot.markerMotion) ═══════════════════════════════
   Quelle: frontend/src/components/viewer/hotspots-animated/markerMotion.ts
   Gespiegelt nach hotspots-animated.css (beide Export-Viewer-Kopien).

   Aufbau: der Marker selbst (.vp-hs-motion) bewegt sich NIE — sein transform
   gehoert der Positionierung. Bewegt werden nur .vp-hs-motion-target (das
   Piktogramm) und die Pseudo-Elemente von .vp-hs-motion-ring. Beide sind
   pointer-events:none, damit die Trefferflaeche unveraendert bleibt.

   Die Animationen laufen nur bei gesetztem [data-motion-run] und haben eine
   endliche Wiederholungszahl (Beruhigung). fill-mode bleibt none: Ruhezustand
   ist immer der Grundstil. */

.vp-hs-motion-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}
.vp-hs-motion-ring::before,
.vp-hs-motion-ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}
.vp-hs-motion-target {
    transform-origin: 50% 50%;
    pointer-events: none;
}

/* 1 Пульс — auslaufende Ringe */
.vp-hs-motion[data-motion="PULSE"][data-motion-run] .vp-hs-motion-ring::before,
.vp-hs-motion[data-motion="PULSE"][data-motion-run] .vp-hs-motion-ring::after {
    border: 2px solid var(--vp-hs-accent, currentColor);
    animation: vp-hs-mo-pulse 2.4s ease-out 3;
}
.vp-hs-motion[data-motion="PULSE"][data-motion-run] .vp-hs-motion-ring::after {
    animation-delay: 1.2s;
}
@keyframes vp-hs-mo-pulse {
    0%   { transform: scale(0.72); opacity: 0.85; }
    100% { transform: scale(2.30); opacity: 0; }
}

/* 2 Дыхание — ruhiges Atmen */
.vp-hs-motion[data-motion="BREATH"][data-motion-run] .vp-hs-motion-target {
    animation: vp-hs-mo-breath 2.8s cubic-bezier(0.4, 0, 0.6, 1) 2;
}
@keyframes vp-hs-mo-breath {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

/* 3 Шаги — wanderndes Aufhellen.
   Einzelne Symbolteile kann CSS nicht ansprechen (das Piktogramm ist ein
   <img> oder ein fremdes <svg>). Statt dessen wandert die Aufhellung in drei
   Stufen nach unten — dieselbe Aussage, mit jedem der 75 Symbole. */
.vp-hs-motion[data-motion="STEPS"][data-motion-run] .vp-hs-motion-target {
    animation: vp-hs-mo-steps 1.8s ease-in-out 4;
}
@keyframes vp-hs-mo-steps {
    0%   { opacity: 0.45; transform: translateY(-10%); }
    12%  { opacity: 1;    transform: translateY(-10%); }
    33%  { opacity: 0.45; transform: translateY(0); }
    45%  { opacity: 1;    transform: translateY(0); }
    66%  { opacity: 0.45; transform: translateY(10%); }
    78%  { opacity: 1;    transform: translateY(10%); }
    100% { opacity: 0.45; transform: translateY(-10%); }
}

/* 4 Орбита — kreisender Teilring */
.vp-hs-motion[data-motion="ORBIT"][data-motion-run] .vp-hs-motion-ring::before {
    inset: -3px;
    border: 2px solid transparent;
    border-top-color: var(--vp-hs-accent, currentColor);
    animation: vp-hs-mo-orbit 6s linear 1;
}
@keyframes vp-hs-mo-orbit {
    0%   { transform: rotate(0deg);   opacity: 0; }
    8%   { opacity: 0.9; }
    88%  { opacity: 0.9; }
    100% { transform: rotate(360deg); opacity: 0; }
}

/* 5 Тихая точка — sehr dezentes Atmen */
.vp-hs-motion[data-motion="QUIET"][data-motion-run] .vp-hs-motion-target {
    animation: vp-hs-mo-quiet 3.6s ease-in-out 2;
}
@keyframes vp-hs-mo-quiet {
    0%, 100% { opacity: 0.95; transform: scale(1); }
    50%      { opacity: 0.60; transform: scale(1.05); }
}

/* 6 Кольцо — ein Ring, der sich einmal schliesst.
   Ohne @property-Unterstuetzung springt der Fortschritt statt zu laufen; der
   Marker zeigt dann kurz den vollen Ring und blendet ihn aus. Kein Fehlbild,
   nur weniger fein. */
@property --vp-hs-mo-p {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 0%;
}
.vp-hs-motion[data-motion="RING"][data-motion-run] .vp-hs-motion-ring::before {
    inset: -3px;
    background: conic-gradient(var(--vp-hs-accent, currentColor) var(--vp-hs-mo-p), transparent 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    animation: vp-hs-mo-ring 3.2s ease-in-out 2;
}
@keyframes vp-hs-mo-ring {
    0%   { --vp-hs-mo-p: 0%;   opacity: 0; }
    8%   { opacity: 0.95; }
    72%  { --vp-hs-mo-p: 100%; opacity: 0.95; }
    100% { --vp-hs-mo-p: 100%; opacity: 0; }
}

/* 7 Внимание — kurzes Wippen, dann Ruhe */
.vp-hs-motion[data-motion="NUDGE"][data-motion-run] .vp-hs-motion-target {
    animation: vp-hs-mo-nudge 3.4s ease-in-out 2;
}
@keyframes vp-hs-mo-nudge {
    0%, 4% { transform: rotate(0deg); }
    9%     { transform: rotate(-4deg); }
    14%    { transform: rotate(4deg); }
    19%    { transform: rotate(-3deg); }
    24%    { transform: rotate(0deg); }
    100%   { transform: rotate(0deg); }
}

/* 8 Скольжение — gleitet nach unten durch und beginnt oben neu.
   Der Zyklus endet ABSICHTLICH in der Mitte und nicht unten: sonst spraenge
   das Symbol nach der letzten Wiederholung sichtbar zurueck. */
.vp-hs-motion[data-motion="SLIDE"][data-motion-run] .vp-hs-motion-target {
    animation: vp-hs-mo-slide 2.6s cubic-bezier(0.4, 0, 0.6, 1) 3;
}
@keyframes vp-hs-mo-slide {
    0%   { transform: translateY(0);    opacity: 1; }
    30%  { transform: translateY(45%);  opacity: 0; }
    31%  { transform: translateY(-45%); opacity: 0; }
    60%  { transform: translateY(0);    opacity: 1; }
    100% { transform: translateY(0);    opacity: 1; }
}

/* 9 Появление — faellt einmal ein und federt nach */
.vp-hs-motion[data-motion="DROP"][data-motion-run] .vp-hs-motion-target {
    animation: vp-hs-mo-drop 3s cubic-bezier(0.2, 0.8, 0.2, 1) 2;
}
@keyframes vp-hs-mo-drop {
    0%   { transform: translateY(-55%); opacity: 0; }
    18%  { transform: translateY(0);    opacity: 1; }
    26%  { transform: translateY(-12%); }
    34%  { transform: translateY(0); }
    100% { transform: translateY(0);    opacity: 1; }
}

/* Dauerlauf NUR fuer die Vorschau im Picker — dort waere ein Abklingen nach
   sieben Sekunden keine Vorschau mehr, sondern ein Raetsel. */
.vp-hs-motion--loop .vp-hs-motion-target,
.vp-hs-motion--loop .vp-hs-motion-ring::before,
.vp-hs-motion--loop .vp-hs-motion-ring::after {
    animation-iteration-count: infinite !important;
}

@media (prefers-reduced-motion: reduce) {
    .vp-hs-motion .vp-hs-motion-target,
    .vp-hs-motion .vp-hs-motion-ring::before,
    .vp-hs-motion .vp-hs-motion-ring::after {
        animation: none !important;
    }
}
/* <<< Spiegel von markerMotion.ts <<< */
/* Szenenwechsel: Marken der neuen Szene blenden je Element ein (viewer.js, nach dem Bildwechsel) */
@keyframes vp-hs-einblenden-kf { from { opacity: 0; } to { opacity: 1; } }
/* verdeckte Beschriftungen (tick setzt data-cap-visible="0" und Inline-Opacity 0) nie animieren: eine Animation ueberstimmt Inline-Stile */
.vp-hs-overlay.vp-hs-einblenden > :not([data-cap-visible="0"]) { animation: vp-hs-einblenden-kf var(--vp-hs-einblenden, 700ms) ease backwards; }
@media (prefers-reduced-motion: reduce) { .vp-hs-overlay.vp-hs-einblenden > :not([data-cap-visible="0"]) { animation: none; } }

/* Schwache GPU / dauerhaft langsame Bilder (viewer.js __vpGlasLite): deckenderes Glas statt Unschaerfe. Feste Ersatzfarben je Thema (KEINE relative
   Farbsyntax: aeltere Browser bekommen dasselbe), Deckkraft nur ANGEHOBEN, nie gesenkt, Schrift bleibt lesbar:
   hell 0,85 -> 0,95 | dunkel 0,74 -> 0,92 | Glas-Thema (Schrift weiss, Glas weiss 0,16) -> dunkle Grundfarbe 0,86 | minimal/minimal-light waren schon deckend.
   Reihenfolge und Spezifitaet spiegeln viewer-tokens.css (Hell-Standard, dunkel, glass, minimal, minimal-light, dann hotspotTheme light/dark). */
html.vp-lite-glass.vp-lite-glass { --vp-hs-blur: none; --vp-hs-glass-strong: rgba(252, 253, 254, 0.95); }
html.dark.vp-lite-glass.vp-lite-glass,
.vp-dark.vp-lite-glass.vp-lite-glass { --vp-hs-glass-strong: rgba(13, 17, 28, 0.92); }
html[data-ui-theme="glass"].vp-lite-glass.vp-lite-glass { --vp-hs-glass-strong: rgba(13, 17, 28, 0.86); }
html[data-ui-theme="minimal"].vp-lite-glass.vp-lite-glass { --vp-hs-glass-strong: #1a1a1a; }
html[data-ui-theme="minimal-light"].vp-lite-glass.vp-lite-glass { --vp-hs-glass-strong: #f2f4f7; }
html[data-hotspot-theme="light"].vp-lite-glass.vp-lite-glass { --vp-hs-glass-strong: rgba(252, 253, 254, 0.95); }
html[data-hotspot-theme="dark"].vp-lite-glass.vp-lite-glass { --vp-hs-glass-strong: rgba(13, 17, 28, 0.92); }

/* ICON-Karte: der Anker wird um den Rest-Faktor skaliert (hotspots-animated.js Stufung), die Karte bleibt dadurch unveraendert gross */
.vp-hs-info-card { transform: translateX(-50%) translateY(8px) scale(var(--vp-hs-gegen, 1)); }
.vp-hs-info-anchor:hover .vp-hs-info-card { transform: translateX(-50%) translateY(0) scale(var(--vp-hs-gegen, 1)); }
