/* Farbprofil-Editor (PRAX2-6396) – Oberfläche des Werkzeugs, unabhängig vom getesteten Profil */

:root {
    --ui-bg: #f4f5f7;
    --ui-surface: #ffffff;
    --ui-surface-2: #f9fafb;
    --ui-line: #dfe3e8;
    --ui-line-strong: #c5ccd4;
    --ui-text: #1d2330;
    --ui-muted: #5f6b7a;
    --ui-faint: #8b95a3;
    --ui-accent: #3056d3;
    --ui-accent-soft: #e8edfc;
    --ui-ok: #1f7a3f;
    --ui-warn: #a15c00;
    --ui-bad: #b3261e;
    --ui-pick: #e0197d;
    --ui-radius: 6px;
    --ui-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ui-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --panel-width: 440px;
    --pages-width: 210px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font: 13px/1.4 var(--ui-font);
    color: var(--ui-text);
    background: var(--ui-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

code, .mono {
    font-family: var(--ui-mono);
    font-size: 11.5px;
}

/* Kopfzeile -------------------------------------------------------------------------------------- */

.pf-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 14px;
    background: var(--ui-surface);
    border-bottom: 1px solid var(--ui-line);
    flex-wrap: wrap;
}

.pf-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 150px;
}

.pf-brand span {
    color: var(--ui-muted);
    font-size: 11px;
}

.pf-profile, .pf-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pf-tools {
    margin-left: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--ui-line-strong);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.3;
}

.btn:hover {
    background: var(--ui-surface-2);
    border-color: var(--ui-faint);
}

.btn:focus-visible, .input:focus-visible, select:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: 1px;
}

.btn--primary {
    background: var(--ui-accent);
    border-color: var(--ui-accent);
    color: #fff;
}

.btn--primary:hover {
    background: #2447b8;
    border-color: #2447b8;
}

.btn--danger {
    color: var(--ui-bad);
}

.btn--ghost {
    border-color: transparent;
    background: transparent;
}

.btn--sm {
    padding: 2px 7px;
    font-size: 12px;
}

.btn[aria-pressed="true"] {
    background: var(--ui-accent-soft);
    border-color: var(--ui-accent);
    color: var(--ui-accent);
}

.btn--pick[aria-pressed="true"] {
    background: #fde7f1;
    border-color: var(--ui-pick);
    color: var(--ui-pick);
}

.segmented {
    display: inline-flex;
    border: 1px solid var(--ui-line-strong);
    border-radius: var(--ui-radius);
    overflow: hidden;
}

.segmented .btn {
    border: 0;
    border-radius: 0;
}

.segmented .btn + .btn {
    border-left: 1px solid var(--ui-line-strong);
}

.input, select.input {
    padding: 4px 7px;
    border: 1px solid var(--ui-line-strong);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    min-width: 0;
}

.input--grow {
    flex: 1 1 auto;
    width: 100%;
}

.menu {
    position: relative;
}

.menu__list {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    /* so breit wie der längste Eintrag, damit Profilnamen nicht umbrechen */
    width: max-content;
    min-width: 250px;
    max-width: min(560px, calc(100vw - 24px));
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    box-shadow: 0 8px 24px rgba(20, 30, 50, 0.14);
    padding: 4px;
    z-index: 30;
}

.menu__list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 9px;
    border: 0;
    background: none;
    border-radius: 4px;
    cursor: pointer;
}

.menu__list button:hover {
    background: var(--ui-accent-soft);
}

.menu__list small {
    display: block;
    color: var(--ui-muted);
}

/* Hauptbereich ---------------------------------------------------------------------------------- */

.pf-main {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: var(--pages-width) minmax(0, 1fr) var(--panel-width);
    min-height: 0;
}

.pf-pages {
    border-right: 1px solid var(--ui-line);
    background: var(--ui-surface);
    overflow-y: auto;
    padding: 8px 0 16px;
}

.pf-pages h3 {
    margin: 12px 14px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ui-faint);
}

.pf-pages button {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    padding: 5px 14px;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.pf-pages button:hover {
    background: var(--ui-surface-2);
}

.pf-pages button[aria-current="page"] {
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--ui-accent);
}

.badge {
    display: inline-block;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--ui-bg);
    color: var(--ui-muted);
    font-size: 10.5px;
    line-height: 17px;
    font-weight: 500;
    white-space: nowrap;
}

.badge--ok {
    background: #e3f3e8;
    color: var(--ui-ok);
}

.badge--warn {
    background: #fdf0dc;
    color: var(--ui-warn);
}

.badge--bad {
    background: #fbe5e3;
    color: var(--ui-bad);
}

.pf-stage {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.pf-stage__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--ui-line);
    background: var(--ui-surface-2);
    flex-wrap: wrap;
    color: var(--ui-muted);
}

.pf-stage__bar .pf-hint {
    margin-left: auto;
}

.pf-stage__viewport {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    padding: 12px;
    position: relative;
}

.pf-stage__frame {
    position: relative;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 30, 50, 0.12), 0 8px 30px rgba(20, 30, 50, 0.08);
    margin: 0 auto;
    overflow: hidden;
}

/*
 * Schriftzug hinter der (durchsichtigen) Vorschau: sichtbar nur, solange dort noch nichts gezeichnet ist –
 * die Seite deckt ihn ab, sobald sie erscheint. Nach dem Laden ganz ausgeblendet.
 */
.pf-frame-placeholder {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.pf-stage__frame--loading .pf-frame-placeholder {
    display: flex;
}

.pf-frame-placeholder .pf-splash__box {
    font-size: 15px;
}

.pf-frame-placeholder .pf-splash__box strong {
    font-size: 24px;
}

.pf-stage__frame iframe {
    position: relative;
    z-index: 1;
    display: block;
    border: 0;
    background: transparent;
    transform-origin: 0 0;
}

.icon {
    width: 14px;
    height: 14px;
    flex: none;
}

.pf-empty {
    max-width: 560px;
    margin: 40px auto;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    padding: 20px 24px;
}

.pf-empty pre {
    background: var(--ui-bg);
    padding: 8px 10px;
    border-radius: 4px;
    overflow-x: auto;
}

/* Panel ------------------------------------------------------------------------------------------ */

.pf-panel {
    border-left: 1px solid var(--ui-line);
    background: var(--ui-surface);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pf-tabs {
    display: flex;
    border-bottom: 1px solid var(--ui-line);
    padding: 0 6px;
    gap: 2px;
    flex-wrap: wrap;
}

.pf-tabs button {
    padding: 9px 7px 8px;
    font-size: 12.5px;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--ui-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.pf-tabs button[aria-selected="true"] {
    color: var(--ui-text);
    font-weight: 600;
    border-bottom-color: var(--ui-accent);
}

.pf-tabs .badge {
    margin-left: 3px;
}

.pf-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 12px 40px;
}

.pf-panel__tools {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pf-intro {
    color: var(--ui-muted);
    margin: 0 0 10px;
}

.pf-group {
    margin: 12px 0 4px;
}

.pf-group > summary {
    cursor: pointer;
    font-weight: 600;
    padding: 4px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pf-group > summary::-webkit-details-marker {
    display: none;
}

.pf-group > summary::before {
    content: "▸";
    color: var(--ui-faint);
    transition: transform 0.1s;
}

.pf-group[open] > summary::before {
    transform: rotate(90deg);
}

.row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: var(--ui-radius);
}

.row:hover {
    background: var(--ui-surface-2);
}

.row--open {
    background: var(--ui-surface-2);
    box-shadow: inset 0 0 0 1px var(--ui-line);
}

.row--muted .row__title {
    color: var(--ui-faint);
}

.row__title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row__sub {
    display: block;
    color: var(--ui-muted);
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row__end {
    display: flex;
    align-items: center;
    gap: 4px;
}

.row__detail {
    grid-column: 1 / -1;
    padding: 8px 0 6px;
    display: grid;
    gap: 10px;
}

.field {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.field > label {
    color: var(--ui-muted);
}

/* Beschriftung neben mehrzeiligen Feldern oben ausrichten */
.field:has(> textarea) {
    align-items: start;
}

.field:has(> textarea) > label {
    padding-top: 6px;
}

/* Felder in Dialogen und Karten nicht aneinanderkleben */
.pf-modal__body > .field + .field,
.pf-modal__body > p + .field,
.card .field + .field {
    margin-top: 12px;
}

.card .field {
    margin-top: 8px;
}

.field__inline {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.swatch {
    width: 26px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background-image: linear-gradient(45deg, #d9dde3 25%, transparent 25%), linear-gradient(-45deg, #d9dde3 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d9dde3 75%), linear-gradient(-45deg, transparent 75%, #d9dde3 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    position: relative;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    flex: none;
}

.swatch > i {
    position: absolute;
    inset: 0;
}

.swatch--sm {
    width: 18px;
    height: 16px;
}

input[type="color"].input {
    width: 40px;
    height: 28px;
    padding: 2px;
}

input[type="range"] {
    width: 100px;
}

.muted {
    color: var(--ui-muted);
}

.small {
    font-size: 11.5px;
}

.source {
    display: block;
    font-family: var(--ui-mono);
    font-size: 11px;
    color: var(--ui-muted);
    word-break: break-all;
}

.source b {
    color: var(--ui-text);
    font-weight: 500;
}

/* Elternkette der Pipette: jedes Glied springt zu diesem Element */
.pf-chain {
    font-family: var(--ui-mono);
    font-size: 11px;
    line-height: 1.6;
    color: var(--ui-muted);
    word-break: break-all;
}

.pf-chain__item, .pf-chain__more {
    display: inline;
    padding: 0 1px;
    border: 0;
    background: none;
    font: inherit;
    color: var(--ui-accent);
    cursor: pointer;
    text-align: left;
    word-break: break-all;
}

.pf-chain__item:hover, .pf-chain__more:hover {
    text-decoration: underline;
}

.pf-chain__item.is-current {
    color: var(--ui-text);
    font-weight: 600;
    cursor: default;
    text-decoration: none;
}

.pf-chain__item:disabled {
    color: inherit;
    cursor: default;
}

.pf-chain__sep {
    margin: 0 3px;
}

.small .pf-chain__item {
    font-family: var(--ui-mono);
}

/* Markierung des Standardwerts (Vorlage) in der Farbauswahl */
.pf-option__default {
    margin-left: auto;
    padding: 0 6px;
    border-radius: 8px;
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    font-size: 10.5px;
    white-space: nowrap;
}

.usage {
    display: flex;
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--ui-bg);
    width: 80px;
}

.usage i {
    display: block;
}

.usage .u-text { background: #6b7cff; }
.usage .u-background { background: #43b58a; }
.usage .u-border { background: #e9a23b; }
.usage .u-other { background: #b8bec7; }

.legend {
    display: flex;
    gap: 10px;
    color: var(--ui-muted);
    font-size: 11px;
    margin: 0 0 8px;
}

.legend span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: -1px;
    background: var(--c);
}

.card {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    padding: 10px;
    margin: 8px 0;
    background: var(--ui-surface);
}

.card h4 {
    margin: 0 0 6px;
    font-size: 13px;
}

.confirm {
    background: #fff7f6;
    border: 1px solid #f1c9c5;
    border-radius: var(--ui-radius);
    padding: 8px;
    display: grid;
    gap: 6px;
}

.logo-preview {
    height: 48px;
    border-radius: 4px;
    border: 1px dashed var(--ui-line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 50% / 12px 12px;
    overflow: hidden;
}

.logo-preview img {
    max-height: 40px;
    max-width: 100%;
}

.pf-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    background: #1d2330;
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--ui-radius);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    max-width: min(640px, 90vw);
    z-index: 50;
}

.pf-toast--show {
    opacity: 1;
}

.pf-toast--bad {
    background: var(--ui-bad);
}

@media (max-width: 1100px) {
    :root {
        --pages-width: 170px;
        --panel-width: 360px;
    }
}

@media (max-width: 820px) {
    body {
        overflow: auto;
    }

    .pf-main {
        grid-template-columns: 1fr;
    }

    .pf-pages, .pf-panel {
        border: 0;
        border-bottom: 1px solid var(--ui-line);
        max-height: 50vh;
    }

    .pf-stage__viewport {
        min-height: 60vh;
    }
}

/* Profilstatus, Speichern/Zurücksetzen, Hinweisleiste ------------------------------------------------ */

.pf-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ui-muted);
}

.pf-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ui-faint);
}

.pf-status--dirty .dot {
    background: #e8a300;
}

.pf-status--saved .dot {
    background: var(--ui-ok);
}

.pf-status--template .dot {
    background: var(--ui-accent);
}

.pf-savebar {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 3px 4px 3px 10px;
    border-radius: var(--ui-radius);
    background: #fff6e0;
    border: 1px solid #f0d58a;
}

.pf-banner {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    margin: 0 0 10px;
    border-radius: var(--ui-radius);
    background: var(--ui-accent-soft);
    color: #20397f;
    font-size: 12.5px;
}

.pf-banner--warn {
    background: #fff6e0;
    color: #6b4a00;
}

.pf-banner .btn {
    margin-left: auto;
    flex: none;
}

/* Farbauswahl mit Vorschau ---------------------------------------------------------------------------- */

.pf-colorsel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 150px;
    max-width: 190px;
    padding: 3px 6px 3px 4px;
    border: 1px solid var(--ui-line-strong);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    cursor: pointer;
    text-align: left;
}

.pf-colorsel:hover {
    border-color: var(--ui-faint);
}

.pf-colorsel__name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-colorsel__caret {
    color: var(--ui-faint);
    font-size: 10px;
}

.swatch--none {
    background-image: linear-gradient(135deg, transparent 45%, #b3261e 45%, #b3261e 55%, transparent 55%);
    background-size: auto;
    background-color: #fff;
}

.pf-popover {
    position: fixed;
    z-index: 60;
    width: 280px;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    box-shadow: 0 10px 30px rgba(20, 30, 50, 0.18);
}

.pf-popover__search {
    padding: 6px;
    border-bottom: 1px solid var(--ui-line);
}

.pf-popover__list {
    overflow-y: auto;
    padding: 4px;
}

.pf-popover__group {
    padding: 6px 8px 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ui-faint);
}

.pf-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 8px;
    border: 0;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.pf-option .pf-option__default + small {
    margin-left: 0;
}

.pf-option small {
    margin-left: auto;
    color: var(--ui-faint);
    font-family: var(--ui-mono);
    font-size: 10.5px;
}

.pf-option[aria-selected="true"] {
    font-weight: 600;
}

.pf-option--active,
.pf-option:hover {
    background: var(--ui-accent-soft);
}

/* Dialoge ------------------------------------------------------------------------------------------ */

.pf-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(20, 26, 38, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pf-modal {
    background: var(--ui-surface);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.pf-modal--wide {
    width: min(1100px, 100%);
    height: calc(100vh - 40px);
}

.pf-modal__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--ui-line);
}

.pf-modal__head h2 {
    margin: 0;
    font-size: 16px;
}

.pf-modal__head .btn--ghost {
    margin-left: auto;
}

.pf-modal__body {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.pf-modal__foot {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 10px 18px 14px;
    border-top: 1px solid var(--ui-line);
    flex-wrap: wrap;
}

.pf-modal .pf-tabs {
    padding: 0 12px;
}

.pf-diff-group h3 {
    margin: 16px 0 6px;
    font-size: 13px;
}

.pf-diff-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1.2fr) minmax(0, 2fr) auto;
    gap: 10px;
    align-items: center;
    padding: 5px 6px;
    border-bottom: 1px solid var(--ui-bg);
}

.pf-diff-row--muted {
    color: var(--ui-muted);
}

.pf-diff-values {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.pf-diff-values .arrow {
    color: var(--ui-faint);
}

.pf-diff-values img {
    max-height: 22px;
    max-width: 90px;
}

.pf-change {
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 9px;
    text-align: center;
}

.pf-change--added { background: #e3f3e8; color: var(--ui-ok); }
.pf-change--removed { background: #fbe5e3; color: var(--ui-bad); }
.pf-change--changed { background: var(--ui-accent-soft); color: var(--ui-accent); }
.pf-change--indirect { background: var(--ui-bg); color: var(--ui-muted); }

.pf-code {
    font-family: var(--ui-mono);
    font-size: 12px;
    white-space: pre;
    background: var(--ui-surface-2);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    padding: 12px;
    overflow: auto;
    margin: 0;
}

.pf-md h1 { font-size: 18px; margin: 0 0 8px; }
.pf-md h2 { font-size: 15px; margin: 18px 0 6px; }
.pf-md h3 { font-size: 13px; margin: 14px 0 4px; }
.pf-md table { border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.pf-md td, .pf-md th { border: 1px solid var(--ui-line); padding: 3px 6px; text-align: left; vertical-align: top; }
.pf-md code { background: var(--ui-bg); padding: 0 3px; border-radius: 3px; }
.pf-md blockquote { margin: 6px 0; padding: 4px 10px; border-left: 3px solid var(--ui-line-strong); color: var(--ui-muted); }
.pf-md ul { margin: 4px 0 8px; padding-left: 20px; }
.pf-md .pf-md-table { overflow-x: auto; }

/* Einführung (Sprechblasen) ----------------------------------------------------------------------- */

.pf-tour-ring {
    position: fixed;
    z-index: 80;
    border-radius: 8px;
    box-shadow: 0 0 0 3px var(--ui-pick), 0 0 0 9999px rgba(20, 26, 38, 0.35);
    pointer-events: none;
    transition: all 0.15s;
}

.pf-tour {
    position: fixed;
    z-index: 81;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #1d2330;
    color: #fff;
    border-radius: 10px;
    padding: 14px 16px 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.pf-tour::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: #1d2330;
    transform: rotate(45deg);
    left: var(--arrow-x, 24px);
}

.pf-tour--below::before { top: -6px; }
.pf-tour--above::before { bottom: -6px; }
.pf-tour--none::before { display: none; }

.pf-tour h4 {
    margin: 0 0 6px;
    font-size: 14px;
}

.pf-tour p {
    margin: 0 0 10px;
    line-height: 1.45;
    color: #d8dde6;
}

.pf-tour__foot {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pf-tour__foot .count {
    color: #9aa4b5;
    font-size: 11.5px;
    margin-right: auto;
}

.pf-tour .btn {
    background: transparent;
    color: #fff;
    border-color: #4a5468;
}

.pf-tour .btn--primary {
    background: #fff;
    color: #1d2330;
    border-color: #fff;
}

/* Fußzeile links unten -------------------------------------------------------------------------------- */

.pf-pages {
    display: flex;
    flex-direction: column;
}

.pf-pages__list {
    flex: 1 1 auto;
}

.pf-credit {
    padding: 14px 14px 6px;
    font-size: 11.5px;
    color: var(--ui-faint);
}

.pf-credit a {
    color: var(--ui-muted);
    font-weight: 600;
    text-decoration: none;
}

.pf-credit a:hover {
    color: var(--ui-accent);
    text-decoration: underline;
}

/* Splash beim ersten Besuch und einmal pro Tag (index.html, editor.js) --------------------------------------- */

.pf-splash {
    display: none;
}

.pf-splash-on .pf-splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ui-bg);
    transition: opacity 0.4s ease;
}

.pf-splash-out .pf-splash {
    opacity: 0;
    pointer-events: none;
}

.pf-splash__box {
    text-align: center;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ui-muted);
    animation: pf-splash-in 0.6s ease both;
}

.pf-splash__box strong {
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--ui-text);
}

@keyframes pf-splash-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* Schein-Fortschritt: läuft in der Mindestzeit (SPLASH_MS in editor.js) voll */
.pf-splash__bar {
    width: 240px;
    height: 4px;
    margin: 18px auto 0;
    border-radius: 2px;
    background: var(--ui-line);
    overflow: hidden;
}

.pf-splash__bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--ui-accent);
    animation: pf-splash-progress 2s linear forwards;
}

@keyframes pf-splash-progress {
    40% {
        width: 55%;
    }

    75% {
        width: 82%;
    }

    100% {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-splash__box {
        animation: none;
    }

    .pf-splash__bar i {
        width: 100%;
        animation: none;
    }

    .pf-splash-on .pf-splash {
        transition: none;
    }
}
