        /* Dark veil that covers everything */
        #nsTutorialVeil {
            position: fixed;
            inset: 0;
            z-index: 9000;
            pointer-events: none; /* veil itself doesn't block clicks */
            transition: opacity 0.35s ease;
        }

        /* Four dim panels that together create the spotlight cutout */
        .ns-dim {
            position: fixed;
            background: rgba(0, 0, 0, 0.78);
            backdrop-filter: blur(1px);
            transition: all 0.38s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 9001;
            pointer-events: all; /* block interaction outside spotlight */
        }

        /* Spotlight border glow ring */
        #nsTutorialRing {
            position: fixed;
            border: 2px solid rgba(74, 158, 255, 0.75);
            border-radius: 12px;
            box-shadow:
                0 0 0 3px rgba(74, 158, 255, 0.18),
                0 0 28px rgba(74, 158, 255, 0.4),
                inset 0 0 20px rgba(74, 158, 255, 0.06);
            z-index: 9002;
            pointer-events: none;
            transition: all 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Tooltip card */
        #nsTutorialCard {
            position: fixed;
            z-index: 9010;
            background: linear-gradient(145deg, rgba(15,23,42,0.97), rgba(20,30,55,0.97));
            border: 1px solid rgba(74,158,255,0.35);
            border-radius: 14px;
            padding: 18px 18px 14px;
            width: min(300px, calc(100vw - 24px));
            box-sizing: border-box;
            box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
            font-family: 'Playfair Display', Georgia, serif;
            color: rgba(255,255,255,0.92);
            transition: opacity 0.25s ease, transform 0.25s ease;
        }

        #nsTutorialCard.ns-fade-out {
            opacity: 0;
            transform: translateY(6px);
        }

        .ns-step-label {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: rgba(74,158,255,0.75);
            margin-bottom: 6px;
            font-family: inherit;
        }

        .ns-card-title {
            font-size: 15px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 8px;
            line-height: 1.3;
        }

        .ns-card-body {
            font-size: 13px;
            line-height: 1.6;
            color: rgba(255,255,255,0.75);
            margin-bottom: 16px;
        }

        .ns-card-body code {
            background: rgba(74,158,255,0.18);
            color: #7eb8ff;
            padding: 1px 5px;
            border-radius: 4px;
            font-family: monospace;
            font-size: 12px;
        }

        .ns-card-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .ns-skip-btn {
            background: none;
            border: none;
            color: rgba(255,255,255,0.35);
            font-size: 11px;
            cursor: pointer;
            font-family: inherit;
            padding: 4px 0;
            transition: color 0.2s;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .ns-skip-btn:hover { color: rgba(255,255,255,0.65); }

        /* Step counter replaces the dots row — no overflow risk */
        .ns-step-counter {
            font-size: 11px;
            color: rgba(255,255,255,0.3);
            font-family: inherit;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .ns-nav-btns {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }

        .ns-back-btn {
            background: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.6);
            border: 1px solid rgba(255,255,255,0.15);
            padding: 7px 13px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            transition: background 0.15s;
        }
        .ns-back-btn:hover { background: rgba(255,255,255,0.14); }
        .ns-back-btn:disabled { opacity: 0.25; cursor: default; }

        .ns-next-btn {
            background: linear-gradient(135deg, #2d6ec7, #4a9eff);
            color: white;
            border: none;
            padding: 7px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            transition: transform 0.15s, box-shadow 0.15s;
            box-shadow: 0 4px 14px rgba(74,158,255,0.35);
            white-space: nowrap;
        }
        .ns-next-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(74,158,255,0.5);
        }
        .ns-next-btn:active { transform: translateY(0); }

        /* Welcome step: full center card, no spotlight */
        #nsTutorialWelcome {
            position: fixed;
            inset: 0;
            z-index: 9010;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ns-welcome-card {
            background: linear-gradient(145deg, rgba(10,18,38,0.98), rgba(15,25,50,0.98));
            border: 1px solid rgba(74,158,255,0.4);
            border-radius: 20px;
            padding: 36px 40px 28px;
            max-width: 420px;
            width: 90%;
            text-align: center;
            font-family: 'Playfair Display', Georgia, serif;
            box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
        }

        .ns-welcome-logo {
            font-size: 32px;
            margin-bottom: 6px;
        }

        .ns-welcome-title {
            font-size: 22px;
            font-weight: 700;
            color: #fff;
            margin-bottom: 6px;
        }

        .ns-welcome-sub {
            font-size: 13px;
            color: rgba(74,158,255,0.9);
            margin-bottom: 18px;
            letter-spacing: 0.5px;
        }

        .ns-welcome-body {
            font-size: 13.5px;
            color: rgba(255,255,255,0.7);
            line-height: 1.65;
            margin-bottom: 28px;
        }

        .ns-welcome-btns {
            display: flex;
            gap: 10px;
            justify-content: center;
        }

        .ns-welcome-start {
            background: linear-gradient(135deg, #2d6ec7, #4a9eff);
            color: white;
            border: none;
            padding: 11px 26px;
            border-radius: 9px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            box-shadow: 0 4px 18px rgba(74,158,255,0.4);
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .ns-welcome-start:hover {
            transform: translateY(-1px);
            box-shadow: 0 7px 22px rgba(74,158,255,0.55);
        }

        .ns-welcome-skip {
            background: rgba(255,255,255,0.07);
            color: rgba(255,255,255,0.5);
            border: 1px solid rgba(255,255,255,0.12);
            padding: 11px 20px;
            border-radius: 9px;
            cursor: pointer;
            font-size: 13px;
            font-family: inherit;
            transition: background 0.2s;
        }
        .ns-welcome-skip:hover {
            background: rgba(255,255,255,0.12);
            color: rgba(255,255,255,0.75);
        }
    
