:root {
    --tour-overlay: rgba(15, 23, 42, 0.58);
    --tour-card-bg: #ffffff;
    --tour-card-border: #dbe4f0;
    --tour-card-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
    --tour-accent: #2563eb;
    --tour-accent-soft: #dbeafe;
    --tour-text: #172033;
    --tour-muted: #5b6475;
}

.app-tour-highlight {
    position: fixed;
    z-index: 1085;
    border-radius: 16px;
    border: 2px solid var(--tour-accent);
    box-shadow: 0 0 0 9999px var(--tour-overlay), 0 12px 32px rgba(37, 99, 235, 0.22);
    pointer-events: none;
    transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.app-tour-card {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1086;
    width: min(420px, calc(100vw - 24px));
    background: var(--tour-card-bg);
    border: 1px solid var(--tour-card-border);
    border-radius: 24px;
    box-shadow: var(--tour-card-shadow);
    color: var(--tour-text);
    overflow: hidden;
}

.app-tour-card.is-hidden,
.app-tour-highlight.is-hidden {
    display: none;
}

.app-tour-card__header {
    padding: 18px 22px 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e5edf7;
}

.app-tour-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tour-accent);
}

.app-tour-card__title {
    margin: 8px 0 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
}

.app-tour-card__body {
    padding: 20px 22px 18px;
}

.app-tour-card__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--tour-accent-soft);
    color: var(--tour-accent);
    font-size: 12px;
    font-weight: 700;
}

.app-tour-card__content {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--tour-muted);
}

.app-tour-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.app-tour-card__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.app-tour-btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.app-tour-btn:hover {
    transform: translateY(-1px);
}

.app-tour-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.app-tour-btn--ghost {
    background: #eef2f7;
    color: #334155;
}

.app-tour-btn--secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #dbe4f0;
}

.app-tour-btn--primary {
    background: var(--tour-accent);
    color: #fff;
}

.app-tour-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #64748b;
}

.app-tour-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tour-accent);
    text-decoration: none;
}

.app-tour-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 22px;
    border: 2px solid rgba(37, 99, 235, 0.35);
    animation: appTourPulse 1.8s ease-out infinite;
}

.app-tour-page-launch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
}

@keyframes appTourPulse {
    0% { transform: scale(0.98); opacity: 0.9; }
    100% { transform: scale(1.06); opacity: 0; }
}

@media (max-width: 768px) {
    .app-tour-card {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        border-radius: 20px;
    }

    .app-tour-card__header,
    .app-tour-card__body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .app-tour-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .app-tour-card__buttons {
        width: 100%;
    }

    .app-tour-btn {
        flex: 1 1 0;
        justify-content: center;
    }
}
