:root {
    --mk-tour-ink: #17202a;
    --mk-tour-muted: #5f6b76;
    --mk-tour-border: #d9e0e5;
    --mk-tour-surface: #ffffff;
    --mk-tour-primary: #087443;
    --mk-tour-primary-hover: #065f37;
    --mk-tour-accent: #2563eb;
    --mk-tour-warning: #fff8db;
    --mk-tour-shadow: 0 18px 55px rgba(15, 23, 42, 0.22);
}

.mk-tour-root[hidden] {
    display: none !important;
}

.mk-tour-root,
.mk-tour-root * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.mk-tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: transparent;
    pointer-events: auto;
}

.mk-tour-backdrop.mk-tour-backdrop-full {
    background: rgba(10, 18, 26, 0.62);
    backdrop-filter: blur(1px);
}

.mk-tour-spotlight {
    position: fixed;
    z-index: 2147483001;
    border: 3px solid #34d399;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(10, 18, 26, 0.62), 0 0 0 6px rgba(52, 211, 153, 0.2);
    pointer-events: none;
    transition: left 160ms ease, top 160ms ease, width 160ms ease, height 160ms ease;
}

.mk-tour-target-blocker {
    position: fixed;
    z-index: 2147483002;
    border-radius: 8px;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

.mk-tour-source-target {
    scroll-margin: 96px;
}

.mk-tour-balloon {
    position: fixed;
    z-index: 2147483003;
    width: min(390px, calc(100vw - 24px));
    max-height: min(560px, calc(100dvh - 24px));
    overflow: auto;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--mk-tour-border);
    border-radius: 8px;
    background: var(--mk-tour-surface);
    color: var(--mk-tour-ink);
    box-shadow: var(--mk-tour-shadow);
    outline: none;
}

.mk-tour-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.mk-tour-kicker {
    color: var(--mk-tour-primary);
    font: 800 11px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-transform: uppercase;
}

.mk-tour-icon-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid var(--mk-tour-border);
    border-radius: 50%;
    background: #f7f9fa;
    color: var(--mk-tour-muted);
    font: 700 22px/1 system-ui, sans-serif;
    cursor: pointer;
}

.mk-tour-title {
    margin: 0;
    color: var(--mk-tour-ink);
    font: 800 21px/1.22 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mk-tour-description {
    margin: 9px 0 0;
    color: var(--mk-tour-muted);
    font: 500 14px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mk-tour-missing {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #eab308;
    background: var(--mk-tour-warning);
    color: #725600;
    font: 650 12px/1.45 system-ui, sans-serif;
}

.mk-tour-progress-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.mk-tour-progress-text {
    min-width: 78px;
    color: var(--mk-tour-muted);
    font: 700 11px/1 system-ui, sans-serif;
}

.mk-tour-progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf0;
}

.mk-tour-progress-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--mk-tour-primary);
    transition: width 180ms ease;
}

.mk-tour-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid #edf0f2;
}

.mk-tour-actions-spacer {
    flex: 1 1 auto;
}

.mk-tour-button,
.mk-tour-manual-link {
    min-height: 38px;
    border-radius: 6px;
    font: 750 12px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mk-tour-button {
    padding: 0 13px;
    border: 1px solid transparent;
    cursor: pointer;
}

.mk-tour-button:focus-visible,
.mk-tour-icon-button:focus-visible,
.mk-tour-manual-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.mk-tour-button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.mk-tour-button-primary {
    background: var(--mk-tour-primary);
    color: #ffffff;
}

.mk-tour-button-primary:hover:not(:disabled) {
    background: var(--mk-tour-primary-hover);
}

.mk-tour-button-secondary {
    border-color: var(--mk-tour-border);
    background: #f7f9fa;
    color: var(--mk-tour-ink);
}

.mk-tour-button-quiet {
    padding-inline: 4px;
    background: transparent;
    color: #9f1239;
}

.mk-tour-manual-link {
    display: inline-flex;
    align-items: center;
    color: var(--mk-tour-accent);
    text-decoration: none;
}

.mk-tour-nudge {
    animation: mk-tour-nudge 220ms ease-out;
}

@keyframes mk-tour-nudge {
    0%, 100% { transform: translateX(0); }
    35% { transform: translateX(-4px); }
    70% { transform: translateX(4px); }
}

@media (max-width: 640px) {
    .mk-tour-balloon {
        width: calc(100vw - 16px);
        max-height: min(70dvh, 560px);
        padding: 15px;
    }

    .mk-tour-title {
        font-size: 18px;
    }

    .mk-tour-actions {
        flex-wrap: wrap;
    }

    .mk-tour-actions-spacer {
        display: none;
    }

    .mk-tour-button-primary,
    .mk-tour-button-secondary {
        flex: 1 1 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mk-tour-spotlight,
    .mk-tour-progress-track > span {
        transition: none;
    }

    .mk-tour-nudge {
        animation: none;
    }
}

@media (prefers-contrast: more) {
    .mk-tour-balloon,
    .mk-tour-button-secondary,
    .mk-tour-icon-button {
        border-color: #111827;
    }

    .mk-tour-spotlight {
        border-width: 4px;
        border-color: #00e676;
    }
}
