.tutorial-open {
    overflow: hidden;
}

.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.tutorial-overlay.is-active {
    pointer-events: auto;
}

.tutorial-scrim {
    position: absolute;
    inset: 0;
    background: transparent;
}


.tutorial-spotlight {
    position: absolute;
    top: var(--tutorial-spotlight-top, 0);
    left: var(--tutorial-spotlight-left, 0);
    width: var(--tutorial-spotlight-width, 0);
    height: var(--tutorial-spotlight-height, 0);
    border: 2px solid var(--primary);
    border-radius: 10px;
    box-shadow:
        0 0 0 9999px rgba(10, 14, 18, 0.56),
        0 0 0 6px color-mix(in srgb, var(--primary) 24%, transparent),
        0 18px 44px rgba(0, 0, 0, 0.26);
    transition: top 220ms ease, left 220ms ease, width 220ms ease, height 220ms ease;
}

.tutorial-card {
    position: absolute;
    top: 0;
    left: 0;
    width: min(380px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    transition: transform 220ms ease;
}

.tutorial-card-header,
.tutorial-actions,
.tutorial-actions-main {
    display: flex;
    align-items: center;
}

.tutorial-card-header,
.tutorial-actions {
    justify-content: space-between;
    gap: 14px;
}

.tutorial-step-count {
    color: var(--primary-strong);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tutorial-card h2 {
    margin: 12px 0 8px;
    font-size: 1.18rem;
    line-height: 1.25;
}

.tutorial-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

.tutorial-icon-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--muted);
}

.tutorial-icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.tutorial-progress {
    display: flex;
    gap: 6px;
    margin: 18px 0;
}

.tutorial-progress-dot {
    height: 6px;
    flex: 1;
    border-radius: 999px;
    background: var(--line);
}

.tutorial-progress-dot.is-active {
    background: var(--primary);
}

.tutorial-actions-main {
    gap: 8px;
}

.tutorial-button {
    min-height: 44px;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 800;
}

.tutorial-button-primary {
    background: var(--primary-strong);
    color: var(--primary-contrast);
}

.tutorial-button-secondary,
.tutorial-button-ghost {
    background: var(--panel-2);
    color: var(--text);
    border-color: var(--line);
}

.tutorial-button-ghost {
    background: transparent;
    color: var(--muted);
}

.tutorial-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.tutorial-highlight-target {
    position: relative;
    pointer-events: none;
}


.tutorial-help-button {
    width: 100%;
    min-height: 44px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    padding: 8px 9px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    text-align: left;
}

.tutorial-help-button:hover {
    background: var(--panel-2);
    color: var(--primary-strong);
}

.tutorial-help-button .nav-icon {
    width: 20px;
    height: 20px;
}

@media (max-width: 767px) {
    .tutorial-card {
        width: calc(100vw - 24px);
        max-height: min(420px, calc(100vh - 24px));
        max-height: min(420px, calc(100dvh - 24px));
    }

    .tutorial-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .tutorial-actions-main,
    .tutorial-button {
        width: 100%;
    }

    .tutorial-actions-main {
        display: grid;
        grid-template-columns: 1fr 1.4fr;
    }
}
