/* ==========================================================================
   Produkt-Tour (Eigenentwicklungen WarroomX · Stillpoint)
   Tabs mit Auto-Tour (pausierbar) · Hinweispunkte · Vergrößerung im <dialog>.
   Farben kommen aus dem Seiten-Thema (--pt-*), gesetzt in warroomx.*.css bzw. stillpoint.*.css.
   ========================================================================== */
.pt-tour {
  --pt-line: color-mix(in srgb, var(--pt-light) 8%, transparent);
  display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 24px clamp(28px, 3.4vw, 48px); align-items: start;
}

/* Tabs */
.pt-tour__nav { display: grid; gap: 14px; position: sticky; top: calc(var(--header-height, 76px) + 24px); }
.pt-tour__tabs { display: grid; gap: 6px; }
.pt-tour__tab {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-content: start; gap: 2px 6px; width: 100%; margin: 0;
  padding: 15px 16px 17px 14px; overflow: hidden; text-align: left; font: inherit; color: var(--pt-mist); cursor: pointer;
  background: color-mix(in srgb, var(--pt-light) 2%, transparent); border: 1px solid var(--pt-line);
  border-left: 2px solid color-mix(in srgb, var(--pt-light) 14%, transparent); border-radius: 3px 12px 3px 3px;
  transition: background var(--motion-fast, .18s), border-color var(--motion-fast, .18s), color var(--motion-fast, .18s);
}
.pt-tour__tab:hover {
  background: color-mix(in srgb, var(--pt-light) 5%, transparent); border-color: color-mix(in srgb, var(--pt-light) 15%, transparent);
  border-left-color: color-mix(in srgb, var(--pt-accent-bright) 55%, transparent);
}
.pt-tour__tab:focus-visible { outline: 2px solid var(--pt-accent-soft); outline-offset: 2px; }
.pt-tour__tab[aria-selected="true"] {
  color: var(--pt-light);
  background: linear-gradient(100deg, color-mix(in srgb, var(--pt-accent) 18%, transparent), color-mix(in srgb, var(--pt-accent) 3%, transparent) 78%);
  border-color: color-mix(in srgb, var(--pt-accent) 35%, transparent); border-left-color: var(--pt-accent-bright);
}
.pt-tour__num { grid-row: 1 / span 2; padding-top: 3px; color: var(--pt-accent-soft); font-family: var(--font-mono); font-size: .72rem; font-weight: 750; letter-spacing: .08em; }
.pt-tour__tab strong { min-width: 0; color: inherit; font-family: var(--pt-font, inherit); font-size: 1.04rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; overflow-wrap: break-word; hyphens: manual; }
.pt-tour__tab[aria-selected="true"] strong { color: #fff; }
.pt-tour__desc { color: var(--pt-dim); font-size: .88rem; line-height: 1.55; }
.pt-tour__tab[aria-selected="true"] .pt-tour__desc { color: var(--pt-mist); }
.pt-tour__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--pt-line); opacity: 0; transition: opacity .2s; }
.pt-tour__progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--pt-accent), var(--pt-accent-bright)); transform: scaleX(0); transform-origin: 0 50%; }
.pt-tour.is-playing .pt-tour__tab[aria-selected="true"] .pt-tour__progress { opacity: 1; }

.pt-tour__play {
  justify-self: start; display: inline-flex; align-items: center; gap: 9px; min-height: 36px; margin: 0; padding: 7px 13px 7px 11px;
  color: var(--pt-mist); font-family: var(--font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: transparent; border: 1px solid color-mix(in srgb, var(--pt-light) 18%, transparent); border-radius: 3px; cursor: pointer;
  transition: color var(--motion-fast, .18s), border-color var(--motion-fast, .18s), background var(--motion-fast, .18s);
}
.pt-tour__play:hover { color: #fff; border-color: color-mix(in srgb, var(--pt-accent-bright) 60%, transparent); background: color-mix(in srgb, var(--pt-accent) 10%, transparent); }
.pt-tour__play:focus-visible { outline: 2px solid var(--pt-accent-soft); outline-offset: 2px; }
.pt-tour__play svg { width: 12px; height: 12px; fill: currentColor; }
.pt-tour__play .pt-i-play, .pt-tour.is-playing .pt-tour__play .pt-i-pause { display: block; }
.pt-tour__play .pt-i-pause, .pt-tour.is-playing .pt-tour__play .pt-i-play { display: none; }

/* Bühne */
.pt-tour__stage { min-width: 0; }
.pt-tour__panel { min-width: 0; }
.pt-tour__panel[hidden] { display: none; }
.pt-tour__lead { display: none; margin: 0 0 14px; color: var(--pt-mist); font-size: .98rem; line-height: 1.6; }
.pt-shot {
  position: relative; margin: 0; overflow: hidden; background: var(--pt-deep);
  border: 1px solid color-mix(in srgb, var(--pt-light) 16%, transparent); border-radius: 3px 18px 3px 3px;
  box-shadow: 0 34px 80px -20px #000000b3, 0 0 0 1px #00000059;
}
.pt-shot__bar {
  display: flex; align-items: center; gap: 10px 14px; min-height: 40px; padding: 8px 14px; overflow: hidden;
  background: var(--pt-bar); border-bottom: 1px solid color-mix(in srgb, var(--pt-light) 10%, transparent);
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .1em; white-space: nowrap;
}
.pt-shot__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--pt-light); }
.pt-shot__brand svg { flex: none; width: 15px; height: 15px; }
.pt-shot__view { overflow: hidden; text-overflow: ellipsis; color: var(--pt-accent-soft); }
.pt-shot__view::before { content: "/"; margin-right: 12px; color: var(--pt-slate); }
.pt-shot__tag { margin-left: auto; color: var(--pt-dim); }
.pt-shot__tag i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--pt-accent-bright); vertical-align: 1px; }
.pt-shot__canvas { position: relative; aspect-ratio: var(--pt-ratio, 1760 / 1066); background: var(--pt-canvas); cursor: zoom-in; }
.pt-shot__canvas > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pt-shot__canvas::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--pt-accent-bright) 22%, var(--pt-accent-pale) 50%, var(--pt-accent-bright) 78%, transparent);
  box-shadow: 0 0 18px 2px color-mix(in srgb, var(--pt-accent-bright) 45%, transparent);
}
.pt-shot__zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin: 0;
  padding: 7px 12px; color: var(--pt-light); font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: color-mix(in srgb, var(--pt-deep) 90%, transparent); border: 1px solid color-mix(in srgb, var(--pt-light) 24%, transparent); border-radius: 3px; cursor: pointer;
  transition: background var(--motion-fast, .18s), border-color var(--motion-fast, .18s), color var(--motion-fast, .18s);
}
.pt-shot__zoom:hover { color: var(--pt-btn-fg); background: var(--pt-btn-bg); border-color: var(--pt-btn-bg); }
.pt-shot__zoom:focus-visible { outline: 2px solid var(--pt-accent-soft); outline-offset: 2px; }
.pt-shot__zoom svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Hinweispunkte */
.pt-pin {
  position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  display: grid; place-items: center; border-radius: 50%; cursor: help;
  color: var(--pt-pin-fg); background: var(--pt-pin-bg); font-family: var(--font-mono); font-size: .72rem; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pt-ink) 85%, transparent), 0 8px 18px #00000080;
  transition: transform .2s var(--ease-standard, ease), background .2s;
}
.pt-pin::before {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--pt-accent-bright);
  opacity: 0; animation: pt-ping 2.8s cubic-bezier(.2, .6, .3, 1) infinite; animation-delay: calc(var(--i, 0) * .45s);
}
.pt-tour:not(.is-inview) .pt-pin::before { animation-play-state: paused; }
@keyframes pt-ping { 0% { transform: scale(.6); opacity: .9; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
.pt-pin.is-hot, .pt-pin:hover, .pt-pin.is-open { transform: scale(1.14); box-shadow: 0 0 0 3px var(--pt-light), 0 8px 18px #00000080; }
.pt-pin::after {
  content: attr(data-note); position: absolute; bottom: calc(100% + 12px); left: -10px; z-index: 4;
  width: max-content; max-width: 250px; padding: 9px 12px; white-space: normal; text-align: left;
  color: var(--pt-ink); background: var(--pt-light); border-radius: 3px 10px 3px 3px; box-shadow: 0 14px 30px #00000073, 0 0 0 1px #0000001f;
  font-family: var(--font-sans); font-size: .82rem; font-weight: 560; letter-spacing: 0; line-height: 1.45;
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .18s, transform .18s;
}
.pt-pin--l::after { left: auto; right: -10px; }
.pt-pin--b::after { bottom: auto; top: calc(100% + 12px); transform: translateY(-4px); }
.pt-pin:hover::after, .pt-pin.is-open::after { opacity: 1; transform: none; }
/* Aktiver Punkt samt Hinweis liegt über allen anderen Punkten und dem Vergrößern-Knopf */
.pt-pin.is-hot { z-index: 5; }
.pt-pin:hover, .pt-pin.is-open { z-index: 6; }

/* Legende unter dem Bild */
.pt-tour__notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 26px; margin: 20px 0 0; padding: 0; list-style: none; }
.pt-tour__notes li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; align-items: start; color: var(--pt-mist); font-size: .92rem; line-height: 1.55; transition: color .18s; }
.pt-tour__notes b {
  display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  color: var(--pt-accent-soft); border: 1px solid color-mix(in srgb, var(--pt-accent-bright) 55%, transparent);
  font-family: var(--font-mono); font-size: .68rem; font-weight: 800; transition: background .18s, color .18s;
}
.pt-tour__notes li.is-hot { color: #fff; }
.pt-tour__notes li.is-hot b { color: var(--pt-pin-fg); background: var(--pt-pin-bg); border-color: var(--pt-pin-bg); }
.pt-tour__footnote { margin: 26px 0 0; color: var(--pt-foot); font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; line-height: 1.6; }

/* Wechsel & Auftritt (nur mit Bewegung) */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="paused"]) .pt-tour__panel.is-entering .pt-shot__canvas > img { animation: pt-shot-in .5s cubic-bezier(.2, .7, .2, 1) both; }
  html:not([data-motion="paused"]) .pt-tour__panel.is-entering .pt-shot__canvas::after { animation: pt-scan .9s cubic-bezier(.45, 0, .2, 1) both; }
  html:not([data-motion="paused"]) .pt-tour__panel.is-entering .pt-pin { animation: pt-pin-in .42s cubic-bezier(.2, .8, .2, 1.2) both; animation-delay: calc(.35s + var(--i, 0) * .09s); }
  html:not([data-motion="paused"]) .pt-tour__panel.is-entering .pt-tour__notes li { animation: pt-note-in .4s ease both; animation-delay: calc(.25s + var(--i, 0) * .06s); }
  html:not([data-motion="paused"]) .pt-tour.is-ready:not(.is-shown) :is(.pt-tour__tab, .pt-tour__play, .pt-tour__stage) { opacity: 0; transform: translateY(14px); }
  html:not([data-motion="paused"]) .pt-tour.is-shown :is(.pt-tour__tab, .pt-tour__play, .pt-tour__stage) {
    transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1), background var(--motion-fast, .18s), border-color var(--motion-fast, .18s), color var(--motion-fast, .18s);
  }
  .pt-tour.is-shown .pt-tour__tab:nth-child(2) { transition-delay: .06s, .06s, 0s, 0s, 0s; }
  .pt-tour.is-shown .pt-tour__tab:nth-child(3) { transition-delay: .12s, .12s, 0s, 0s, 0s; }
  .pt-tour.is-shown .pt-tour__tab:nth-child(4) { transition-delay: .18s, .18s, 0s, 0s, 0s; }
  .pt-tour.is-shown .pt-tour__tab:nth-child(5) { transition-delay: .24s, .24s, 0s, 0s, 0s; }
  .pt-tour.is-shown .pt-tour__play { transition-delay: .3s, .3s, 0s, 0s, 0s; }
  .pt-tour.is-shown .pt-tour__stage { transition-delay: .1s, .1s; }
}
@keyframes pt-shot-in { from { opacity: .25; transform: scale(1.012); filter: saturate(.6); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pt-scan { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: .9; } 100% { top: 100%; opacity: 0; } }
@keyframes pt-pin-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes pt-note-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pt-pin::before { animation: none; opacity: 0; }
  .pt-tour__tab, .pt-tour__play, .pt-pin, .pt-pin::after, .pt-tour__notes li, .pt-shot__zoom { transition: none; }
}
html[data-motion="paused"] .pt-pin::before { animation: none; opacity: 0; }
html.st-lite .pt-shot__canvas::after { display: none; }

/* Vergrößerung */
.pt-lightbox {
  width: min(1520px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden;
  color: var(--pt-light); background: var(--pt-deep); border: 1px solid color-mix(in srgb, var(--pt-light) 20%, transparent); border-radius: 3px 18px 3px 3px;
  box-shadow: 0 40px 120px #000000b3;
}
.pt-lightbox::backdrop { background: #05070acc; }
.pt-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.pt-lightbox__hint { display: none; }
.pt-lightbox__head, .pt-lightbox__foot { display: flex; align-items: center; gap: 12px 16px; padding: 10px 12px 10px 18px; }
.pt-lightbox__head { border-bottom: 1px solid color-mix(in srgb, var(--pt-light) 10%, transparent); }
.pt-lightbox__foot { border-top: 1px solid color-mix(in srgb, var(--pt-light) 10%, transparent); padding-left: 12px; }
.pt-lightbox__count { color: var(--pt-accent-soft); font-family: var(--font-mono); font-size: .72rem; font-weight: 750; letter-spacing: .1em; }
.pt-lightbox__title { flex: 1 1 auto; min-width: 0; margin: 0; color: #fff; font-family: var(--pt-font, inherit); font-size: 1rem; font-weight: 650; letter-spacing: -.01em; }
.pt-lightbox__caption { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--pt-mist); font-size: .92rem; line-height: 1.5; }
.pt-lightbox__figure { margin: 0; min-height: 0; background: var(--pt-canvas); }
.pt-lightbox__figure:focus-visible { outline: 2px solid var(--pt-accent-soft); outline-offset: -2px; }
.pt-lightbox__figure img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 32px - 124px); object-fit: contain; }
.pt-lightbox button {
  flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0;
  color: var(--pt-light); background: color-mix(in srgb, var(--pt-light) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--pt-light) 18%, transparent); border-radius: 3px; cursor: pointer;
  transition: background var(--motion-fast, .18s), border-color var(--motion-fast, .18s), color var(--motion-fast, .18s);
}
.pt-lightbox button:hover { color: var(--pt-btn-fg); background: var(--pt-btn-bg); border-color: var(--pt-btn-bg); }
.pt-lightbox button:focus-visible { outline: 2px solid var(--pt-accent-soft); outline-offset: 2px; }
.pt-lightbox button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.pt-modal-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="paused"]) .pt-lightbox[open] { animation: pt-dialog-in .28s cubic-bezier(.2, .7, .2, 1); }
  html:not([data-motion="paused"]) .pt-lightbox[open]::backdrop { animation: pt-fade .28s ease; }
}
@keyframes pt-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pt-fade { from { opacity: 0; } to { opacity: 1; } }

/* Tablet: Tabs als Reihe über dem Bild */
@media (max-width: 1100px) {
  .pt-tour { grid-template-columns: minmax(0, 1fr); }
  .pt-tour__nav { position: static; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .pt-tour__tabs { grid-template-columns: repeat(var(--pt-count, 4), minmax(0, 1fr)); }
  .pt-tour__tab { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 12px 14px; }
  .pt-tour__num { grid-row: auto; padding-top: 0; }
  .pt-tour__desc { display: none; }
  .pt-tour__lead { display: block; }
  .pt-tour__play { align-self: stretch; }
}
@media (max-width: 900px) {
  .pt-tour[style*="--pt-count:5"] .pt-tour__nav { grid-template-columns: minmax(0, 1fr); }
  .pt-tour[style*="--pt-count:5"] .pt-tour__play { align-self: auto; }
}
@media (max-width: 760px) {
  .pt-tour__nav { grid-template-columns: minmax(0, 1fr); }
  .pt-tour__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-tour__tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pt-tour__tab strong { font-size: .95rem; }
  .pt-tour__play { align-self: auto; }
  .pt-shot { border-radius: 3px 12px 3px 3px; }
  .pt-shot__bar { gap: 10px; padding: 7px 10px; font-size: .62rem; }
  .pt-shot__tag { display: none; }
  .pt-pin { width: 20px; height: 20px; margin: -10px 0 0 -10px; font-size: .62rem; box-shadow: 0 0 0 2px color-mix(in srgb, var(--pt-ink) 85%, transparent), 0 6px 12px #00000080; }
  .pt-pin::before { inset: -5px; }
  .pt-pin::after { display: none; }
  .pt-shot__zoom { right: 8px; bottom: 8px; min-height: 32px; padding: 6px 9px; }
  .pt-shot__zoom span { display: none; }
  .pt-tour__notes { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .pt-lightbox__caption { font-size: .85rem; }
}

/* Kleine Bildschirme (hoch und quer): Screenshot in Lesegröße, verschiebbar */
@media (max-width: 760px), (max-height: 520px) {
  .pt-lightbox { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .pt-lightbox__figure { display: grid; align-items: center; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .pt-lightbox__figure img { width: 920px; max-width: none; max-height: none; }
  .pt-lightbox__hint { display: inline; flex: 0 0 auto; color: var(--pt-dim); font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; }
  .pt-lightbox__head, .pt-lightbox__foot { padding-block: 6px; }
}
