/*
 * Geführte Tour (assets/tour.js). Farben ausschliesslich aus theme.css
 * (Light/Dark), keine eigenen Werte ausser der Abdunkelung.
 */
.tour-shield { position: fixed; inset: 0; z-index: 9000; background: transparent; }
.tour-shield.dim { background: rgba(10, 14, 18, 0.58); }

/* Spotlight: der Rahmen um das Zielelement; der riesige Schatten dunkelt den Rest ab. */
.tour-spot {
    position: fixed; z-index: 9001; pointer-events: none; box-sizing: border-box;
    border: 3px solid var(--accent-2); border-radius: 10px;
    box-shadow: 0 0 0 4000px rgba(10, 14, 18, 0.58);
}
.tour-spot[hidden] { display: none; }

/* Sprachwechsel und Theme-Umschalter bleiben während der Tour bedienbar. */
body.tour-active .lang-switch,
body.tour-active .theme-toggle { position: relative; z-index: 9100; }

.tour-pop {
    position: fixed; z-index: 9200; box-sizing: border-box;
    width: 380px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto;
    padding: 16px 18px 16px; border-radius: 12px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    font-size: 14px; line-height: 1.55;
}
.tour-pop.tour-welcome { width: 460px; padding: 24px 26px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.tour-pop h2 { margin: 4px 0 6px; font-size: 18px; line-height: 1.3; color: var(--text); }
.tour-pop p { margin: 0; color: var(--text-2); }
.tour-pop .tour-hint { margin-top: 14px; font-size: 12px; color: var(--text-3); }

.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-badge {
    padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: bold;
    background: var(--accent-2-soft, rgba(217, 166, 43, 0.18)); color: var(--text);
    border: 1px solid var(--accent-2);
}
.tour-link {
    border: 0; background: transparent; padding: 6px 4px; font: inherit; font-size: 12px;
    color: var(--text-3); cursor: pointer; text-decoration: underline;
}
.tour-link:hover { color: var(--accent); }

.tour-list { margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tour-list > div { display: flex; gap: 10px; font-size: 13px; line-height: 1.4; }
.tour-list dt { flex: 0 0 104px; font-family: "Courier New", monospace; font-weight: bold; color: var(--accent); }
.tour-list dd { margin: 0; color: var(--text); }

.tour-dots { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.tour-dot {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--border); cursor: pointer;
    box-sizing: content-box; border: 6px solid transparent; background-clip: padding-box; margin: -6px -2px;
}
.tour-dot.active { width: 20px; background-color: var(--accent-fill); }

.tour-nav { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.tour-btn {
    min-height: 36px; padding: 0 16px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.tour-btn:hover { border-color: var(--accent); color: var(--accent); }
.tour-btn.primary { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--on-accent); font-weight: bold; }
.tour-btn.primary:hover { background: var(--accent-fill-hover); color: var(--on-accent); }
.tour-pop button:focus-visible, .tour-endbar button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.tour-welcome .tour-nav { margin-top: 20px; }

/* Ruhige Leiste am Ende der Tour */
.tour-endbar {
    position: fixed; z-index: 9200; left: 50%; bottom: 16px; transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); box-sizing: border-box;
    padding: 10px 14px; border-radius: 10px; font-size: 13px;
    background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.tour-endbar .tour-btn { min-height: 32px; font-size: 13px; padding: 0 12px; white-space: nowrap; }

.tour-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
    .tour-spot { transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease; }
}

/* Mobil: Bottom Sheet statt schwebender Karte */
@media (max-width: 640px) {
    .tour-pop, .tour-pop.tour-welcome {
        top: auto; left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none;
        border-radius: 20px 20px 0 0; padding: 14px 20px 20px; max-height: 70vh;
    }
    .tour-pop.tour-welcome { top: auto; left: 0; }
    .tour-nav .tour-btn { flex: 1; min-height: 48px; font-size: 15px; }
    .tour-nav .tour-btn.primary { flex: 2; }
    .tour-link { min-height: 44px; font-size: 13px; }
    .tour-endbar { left: 12px; right: 12px; transform: none; bottom: 12px; flex-wrap: wrap; }
}
