.ip-view { position: relative; width: 100%; min-width: 0; isolation: isolate; }
/* Website geometry follows ostermann-shk.de. The editor keeps its own radii. */
.ip-scope.ip-view { --ip-radius-control: 12px; --ip-radius-card: 24px; --ip-radius-dialog: 16px; --ip-marker-active: #ce020e; }
/* Override the important auto-margins of WordPress constrained layouts. */
.ip-view.ip-align-left { margin-left: 0 !important; margin-right: auto !important; }
.ip-view.ip-align-center { margin-left: auto !important; margin-right: auto !important; }
.ip-view.ip-align-right { margin-left: auto !important; margin-right: 0 !important; }

/* No frame: the rounded image carries the layout, the explanations sit freely beside or below it. */
.ip-view.ip-with-list { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: stretch; }
/* The image takes all remaining width; the panel wraps below once the image would drop under 62 %. */
.ip-with-list > .ip-visual { flex: 999 1 0; min-width: 62%; align-self: flex-start; }
.ip-with-list > :is(.ip-panel, .ip-explanations) { flex: 1 1 280px; min-width: 0; }
.ip-visual { position: relative; min-width: 0; }
.ip-stage { position: relative; width: 100%; line-height: 0; }
.ip-view .ip-image { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; border: 0; border-radius: var(--ip-radius-card); box-shadow: none; }
.ip-view .ip-instruction { margin: 0; padding: 10px 4px 0; color: var(--ip-muted); font-size: .8125rem; line-height: 1.5; }

/* Points: a calm blue dot by default; the selected point turns red and runs its animation. */
.ip-scope .ip-marker { position: absolute; z-index: 1; transform: translate(-50%, -50%); display: grid; place-items: center; width: max(44px, var(--ip-point-size, 32px)); height: max(44px, var(--ip-point-size, 32px)); min-width: 44px; padding: 0; border: 0; border-radius: var(--ip-point-radius, 50%); background: transparent; color: var(--ip-point-ink, #fff); cursor: pointer; box-shadow: none; font: 700 var(--ip-point-font, .8125rem)/1 var(--ip-font); text-decoration: none; touch-action: manipulation; }
/* Themes such as Hello style every button and its hover/focus state; neutralize that for the website view. */
.ip-view.ip-scope .ip-marker { margin: 0; min-height: 44px; border: 0; background: transparent; color: var(--ip-point-ink, #fff); box-shadow: none; letter-spacing: 0; text-transform: none; white-space: nowrap; transition: none; }
.ip-scope .ip-marker:is(:hover, .is-hinted, [aria-expanded="true"], .is-selected) { z-index: 2; }
.ip-marker-face { position: relative; display: grid; place-items: center; width: var(--ip-point-size, 32px); height: var(--ip-point-size, 32px); border: 2px solid #fff; border-radius: var(--ip-point-radius, 50%); background: var(--ip-point-color, #326799); color: var(--ip-point-ink, #fff); box-shadow: 0 1px 2px #0000002e, 0 4px 12px #00000026; pointer-events: none; transition: transform var(--ip-fast) var(--ip-enter), background-color var(--ip-fast); }
.ip-marker-face::before { content: ""; position: absolute; inset: -8px; border: 2px solid var(--ip-marker-active, #ce020e); border-radius: inherit; opacity: 0; pointer-events: none; }
.ip-marker:is(:hover, .is-hinted) .ip-marker-face { transform: scale(1.12); }
/* Clearly selected: larger, in the selection color, with a steady halo around it. */
.ip-marker:is([aria-expanded="true"], .is-selected) .ip-marker-face { background: var(--ip-marker-active, #ce020e); color: var(--ip-marker-active-ink, #fff); transform: scale(1.35); box-shadow: 0 0 0 6px #ce020e4d, 0 4px 14px #00000040; box-shadow: 0 0 0 6px color-mix(in srgb, var(--ip-marker-active, #ce020e) 30%, transparent), 0 4px 14px #00000040; }
/* The animation chosen in the editor ("Animation bei Auswahl") runs only on the selected point. */
.ip-marker[data-ip-animation="ring"]:is([aria-expanded="true"], .is-selected) .ip-marker-face::before { animation: ip-pulse var(--ip-point-duration, 2.8s) ease-out infinite; }
.ip-marker[data-ip-animation="breathe"]:is([aria-expanded="true"], .is-selected) .ip-marker-face { animation: ip-breathe var(--ip-point-duration, 2.8s) ease-in-out infinite; }
.ip-marker-caption { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 140px; padding: 4px 8px; border-radius: 8px; background: var(--ip-surface); color: var(--ip-text); box-shadow: 0 1px 2px #0000001f, 0 4px 12px #0000001a; font: 600 .75rem/1.4 var(--ip-font); overflow-wrap: anywhere; pointer-events: none; }

/* Filter, tour start and step navigation. */
.ip-view-controls, .ip-tour-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.ip-visual > .ip-view-controls { padding: 12px 0 0; }
.ip-view.ip-scope :is(.ip-view-controls, .ip-tour-nav) :is(button, select) { min-height: 44px; max-width: 100%; margin: 0; padding: 8px 14px; border: 2px solid var(--ip-brand); border-radius: var(--ip-radius-control); background: var(--ip-surface); color: var(--ip-brand); box-shadow: none; font: 600 .875rem/1.2 var(--ip-font); letter-spacing: 0; text-transform: none; white-space: normal; cursor: pointer; transition: background-color var(--ip-fast), color var(--ip-fast); }
.ip-view.ip-scope :is(.ip-view-controls, .ip-tour-nav) button:not(:disabled):hover { background: var(--ip-brand); color: var(--ip-surface); }
.ip-view.ip-scope .ip-tour-nav button:disabled { opacity: .45; cursor: default; }
.ip-view-controls [role="status"], .ip-tour-nav [role="status"] { color: var(--ip-muted); font-size: .8125rem; }
.ip-view-controls [role="status"]:empty { display: none; }
.ip-scope :is(.ip-info-link, [data-ip-entry-link]) { display: inline-flex; align-items: center; min-height: 44px; color: var(--ip-link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; transition: color var(--ip-fast); }
.ip-scope :is(.ip-info-link, [data-ip-entry-link]):hover { color: var(--ip-brand); }
.ip-scope a:focus-visible { outline: 3px solid var(--ip-focus); outline-offset: 3px; }
.ip-category { display: inline-block; padding: 1px 8px; border: 1px solid var(--ip-border); border-radius: 999px; color: var(--ip-muted); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.ip-single-category .ip-category { display: none; }

/* Info box at the point: used without a docked panel and on small screens. */
.ip-scope .ip-info { position: absolute; z-index: 20; inset: auto; margin: 0; width: min(320px, calc(100% - 24px)); max-width: none; max-height: min(400px, 65vh); overflow: auto; overscroll-behavior: contain; padding: 18px 20px 16px; border: 1px solid var(--ip-border); border-radius: var(--ip-radius-dialog); background: var(--ip-surface); color: var(--ip-text); box-shadow: 0 2px 6px #10283b14, 0 16px 40px #10283b24; font: inherit; line-height: 1.6; }
.ip-info[open] { animation: ip-reveal var(--ip-expand) var(--ip-enter); }
.ip-view.ip-scope .ip-info-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ip-muted); box-shadow: none; font: 400 1.5rem/1 system-ui, sans-serif; cursor: pointer; transition: background-color var(--ip-fast), color var(--ip-fast); }
.ip-view.ip-scope .ip-info-close:hover { background: var(--ip-soft); background: color-mix(in srgb, var(--ip-border) 45%, transparent); color: var(--ip-text); }
.ip-view.ip-scope .ip-info-close:focus-visible { outline-offset: -3px; }
.ip-info-number { display: block; margin: 0 40px 4px 0; color: var(--ip-link); font: 700 .75rem/1.4 var(--ip-font); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.ip-scope .ip-info h3 { margin: 0 40px 8px 0; color: var(--ip-brand); font: 600 1.125rem/1.3 var(--ip-font); overflow-wrap: anywhere; }
.ip-scope .ip-info p, .ip-scope .ip-explanations p { margin: 0; color: var(--ip-text); font-size: .9375rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ip-info .ip-tour-nav { margin-top: 16px; }

/* Docked explanation panel. frontend.js limits it to the image height when it sits beside the image. */
.ip-panel { display: flex; flex-direction: column; min-height: 0; }
.ip-panel > .ip-view-controls { padding: 0 12px 12px; }
.ip-view .ip-explanations { list-style: none; margin: 0; padding: 0; min-width: 0; }
.ip-panel > .ip-explanations { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ip-ready:not(.ip-with-list) .ip-explanations { display: none; }
.ip-view .ip-explanations li { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 10px 12px; border-radius: var(--ip-radius-control); transition: background-color var(--ip-fast), box-shadow var(--ip-fast); }
.ip-view .ip-explanations li + li { margin-top: 2px; }
.ip-explanations li > div { flex: 1 1 auto; min-width: 0; }
/* The list number repeats the color of its point, so list and image read as one. */
.ip-entry-number { flex: 0 0 auto; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--ip-point-color, var(--ip-accent)); color: var(--ip-point-ink, var(--ip-on-accent)); font: 700 .75rem/1 var(--ip-font); font-variant-numeric: tabular-nums; transition: background-color var(--ip-fast), color var(--ip-fast); }
.ip-scope .ip-explanations h3 { margin: 0 0 4px; color: var(--ip-brand); font: 600 1rem/1.4 var(--ip-font); overflow-wrap: anywhere; }
/* Interactive: a compact index; the active entry opens in place when the panel sits beside the image. */
.ip-ready .ip-explanations li { padding: 0 12px; }
.ip-ready .ip-entry-number { margin-top: 9px; }
/* Hover (also from the point in the image) shows the same frame as the selected entry. */
.ip-ready .ip-explanations li:is(:hover, .is-hinted) { background: var(--ip-selected); box-shadow: inset 0 0 0 1px var(--ip-border); }
.ip-ready .ip-explanations li > div { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.ip-ready .ip-explanations li > div > :not(h3, .ip-category) { flex: 1 0 100%; }
.ip-ready .ip-explanations h3 { flex: 1 1 auto; min-width: 0; margin: 0; }
.ip-ready .ip-explanations :is([data-ip-entry-text], [data-ip-entry-link]) { display: none; }
.ip-ready .ip-explanations li.is-active { background: var(--ip-selected); box-shadow: inset 0 0 0 1px var(--ip-border); }
.ip-explanations li.is-active .ip-entry-number { background: var(--ip-marker-active, #ce020e); color: var(--ip-marker-active-ink, #fff); }
.ip-beside .ip-explanations li.is-active [data-ip-entry-text] { display: block; position: relative; z-index: 1; padding: 0 0 12px; }
.ip-beside .ip-explanations li.is-active [data-ip-entry-link] { display: inline-flex; position: relative; z-index: 1; flex: 0 0 auto; margin: -8px 0 4px; }
/* In the narrow panel: progress on top, both steps side by side. */
.ip-explanations .ip-tour-nav { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.ip-explanations .ip-tour-nav [role="status"] { grid-column: 1 / -1; order: -1; }
.ip-view.ip-scope .ip-explanations .ip-tour-nav button { justify-content: center; text-align: center; }
.ip-view.ip-scope .ip-entry-button { display: flex; align-items: center; width: 100%; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ip-brand); box-shadow: none; text-align: left; font: inherit; line-height: 1.4; letter-spacing: inherit; text-transform: none; white-space: normal; cursor: pointer; overflow-wrap: anywhere; transition: none; }
/* The whole row is the click target. */
.ip-entry-button::after { content: ""; position: absolute; inset: 0; border-radius: var(--ip-radius-control); }
.ip-view.ip-scope .ip-entry-button:focus-visible { outline: none; }
.ip-view.ip-scope .ip-entry-button:focus-visible::after { outline: 3px solid var(--ip-focus); outline-offset: -3px; }

@keyframes ip-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes ip-breathe { 0%, 100% { transform: scale(1.28); } 50% { transform: scale(1.42); } }
@keyframes ip-reveal { from { opacity: .82; } to { opacity: 1; } }
@media (max-width: 800px) {
    .ip-view.ip-with-list { flex-direction: column; }
    .ip-with-list > :is(.ip-visual, .ip-panel, .ip-explanations) { width: 100%; min-width: 0; flex: 0 0 auto; align-self: stretch; }
}
@media (max-width: 640px) {
    .ip-view .ip-instruction { padding: 8px 2px 0; }
}

/* Smartphones (class set by frontend.js): swipeable cards directly below the image, no overlay.
   7 % side padding with cards filling the padded width: each card is 86 % wide, centered, neighbours peek in. */
.ip-carousel-nav { display: none; }
.ip-view.ip-scope.ip-mobile .ip-explanations { position: relative; display: flex; gap: 12px; max-height: none; margin: 12px 0 0; padding: 2px 7% 6px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ip-view.ip-mobile .ip-explanations::-webkit-scrollbar { display: none; }
.ip-view.ip-mobile .ip-explanations li, .ip-view.ip-mobile .ip-explanations li + li { flex: 0 0 100%; align-items: flex-start; margin: 0; padding: 8px 14px 10px; border: 1px solid var(--ip-border); border-radius: var(--ip-radius-dialog); background: var(--ip-surface); box-shadow: none; scroll-snap-align: center; scroll-snap-stop: always; }
.ip-view.ip-mobile .ip-explanations li.is-active { border-color: var(--ip-marker-active, #ce020e); background: var(--ip-surface); box-shadow: inset 0 0 0 1px var(--ip-marker-active, #ce020e); }
.ip-view.ip-mobile .ip-explanations [data-ip-entry-text] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; margin: 0 0 2px; padding: 0; }
.ip-view.ip-mobile .ip-explanations li.is-expanded [data-ip-entry-text] { display: block; -webkit-line-clamp: none; }
.ip-view.ip-mobile .ip-explanations [data-ip-entry-link] { display: inline-flex; }
.ip-view.ip-mobile .ip-explanations :is([data-ip-entry-link], .ip-more) { position: relative; z-index: 1; flex: 0 0 auto; }
.ip-view.ip-scope .ip-more { min-height: 44px; margin: 0 16px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ip-brand); box-shadow: none; font: 600 .875rem/1.2 var(--ip-font); letter-spacing: 0; text-decoration: underline; text-underline-offset: 3px; text-transform: none; white-space: normal; cursor: pointer; }
.ip-view.ip-mobile .ip-carousel-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.ip-view.ip-scope .ip-carousel-nav button { display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0 0 3px; border: 2px solid var(--ip-brand); border-radius: 50%; background: var(--ip-surface); color: var(--ip-brand); box-shadow: none; font: 400 1.625rem/1 system-ui, sans-serif; cursor: pointer; }
.ip-view.ip-scope .ip-carousel-nav button:disabled { opacity: .35; cursor: default; }
.ip-carousel-nav [role="status"] { min-width: 72px; color: var(--ip-muted); font-size: .875rem; text-align: center; font-variant-numeric: tabular-nums; }
/* The swipe itself is the step-by-step tour on smartphones. */
.ip-mobile .ip-view-controls > button { display: none; }
