.tutorial { pointer-events: none; }
.tutorial[hidden] { display: none; }
.tutorial__backdrop { position: fixed; z-index: 2000; inset: 0; background: rgb(13 19 25 / .66); pointer-events: auto; }
.tutorial__card { position: fixed; z-index: 2002; top: 50%; left: 50%; width: min(calc(100% - 32px), 460px); max-height: calc(100dvh - 32px); padding: var(--rz-space-6); overflow-y: auto; border: 1px solid var(--rz-overlay-border); border-radius: var(--rz-radius-md); background: var(--rz-overlay-surface-strong); box-shadow: var(--rz-shadow-lg); pointer-events: auto; transform: translate(-50%, -50%); -webkit-backdrop-filter: blur(var(--rz-overlay-blur)); backdrop-filter: blur(var(--rz-overlay-blur)); }
.tutorial__card:focus { outline: none; }
.tutorial__topline, .tutorial__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--rz-space-3); }
.tutorial__step { color: var(--rz-color-text-muted); font-size: var(--rz-text-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tutorial__close { display: grid; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--rz-radius-xs); background: transparent; color: var(--rz-color-text-muted); cursor: pointer; place-items: center; }
.tutorial__close:hover { background: var(--rz-color-surface-muted); color: var(--rz-color-ink); }
.tutorial__close:focus-visible { outline: 3px solid rgb(1 96 51 / .25); outline-offset: 2px; }
.tutorial__icon { display: grid; width: 44px; height: 44px; margin: var(--rz-space-2) 0 var(--rz-space-3); border-radius: var(--rz-radius-sm); background: var(--rz-color-brand-soft); color: var(--rz-color-brand); place-items: center; }
.tutorial__card h2 { margin-bottom: var(--rz-space-2); }
.tutorial__card p { margin-bottom: var(--rz-space-5); color: var(--rz-color-text-secondary); line-height: var(--rz-leading-body); }
body.tutorial-active { overflow: hidden; }
body.tutorial-active .tutorial-target-container { position: relative; z-index: 2001; overflow: visible; }
body.tutorial-active .tutorial-surface-elevated { position: relative; z-index: 2001; box-shadow: 0 0 0 4px var(--rz-color-white), 0 16px 40px rgb(13 19 25 / .28); }
body.tutorial-active .tutorial-target { position: relative; z-index: 2001; border-radius: var(--rz-radius-sm); outline: 4px solid var(--rz-color-brand-light); outline-offset: 5px; box-shadow: 0 16px 40px rgb(13 19 25 / .3); animation: tutorial-pulse 1.6s ease-in-out infinite; }
@keyframes tutorial-pulse { 50% { box-shadow: 0 0 0 10px rgb(64 185 121 / .22), 0 16px 40px rgb(13 19 25 / .3); } }
@media (min-width: 992px) { body.tutorial-active #sidebar-container { position: relative; z-index: 2001; } }
@media (max-width: 991.98px) {
    body.tutorial-active #sidebar-container { z-index: 2001; }
    .tutorial__card { top: auto; right: var(--rz-space-3); bottom: calc(var(--rz-mobile-nav-height) + env(safe-area-inset-bottom) + var(--rz-space-3)); left: auto; width: min(360px, calc(100vw - 2 * var(--rz-space-3))); max-height: min(42dvh, 310px); padding: var(--rz-space-4); transform: none; }
    .tutorial--compact-mobile .tutorial__card { right: var(--rz-space-2); bottom: calc(var(--rz-mobile-nav-height) + env(safe-area-inset-bottom) + var(--rz-space-2)); width: min(300px, calc(100vw - 2 * var(--rz-space-2))); max-height: min(32dvh, 190px); padding: var(--rz-space-3); }
    .tutorial--compact-mobile .tutorial__step { font-size: 10px; }
    .tutorial--compact-mobile .tutorial__card h2 { margin-bottom: 4px; font-size: var(--rz-text-sm); }
    .tutorial--compact-mobile .tutorial__card p { margin-bottom: var(--rz-space-2); font-size: var(--rz-text-xs); line-height: 1.35; }
    .tutorial--compact-mobile .tutorial__card .btn { min-height: 34px; padding: 5px 9px; font-size: var(--rz-text-xs); }
}
@media (max-width: 575.98px) {
    .tutorial__footer { align-items: stretch; flex-direction: column; }
    .tutorial__footer > .btn, .tutorial__footer > .cluster { width: 100%; }
    .tutorial__footer > .cluster .btn { flex: 1; }
    .tutorial--compact-mobile .tutorial__footer { align-items: center; flex-direction: row; }
    .tutorial--compact-mobile .tutorial__footer > .btn, .tutorial--compact-mobile .tutorial__footer > .cluster { width: auto; }
}
@media (prefers-reduced-motion: reduce) { body.tutorial-active .tutorial-target { animation: none; } }
