.demo-tour-help {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10020;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
  cursor: pointer;
}

.demo-tour-help:hover,
.demo-tour-help:focus-visible {
  border-color: var(--primary);
  background: var(--bg-hover);
  outline: none;
}

.demo-tour-help i { font-size: 22px; }

.demo-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 9, 18, .58);
  pointer-events: none;
}

.demo-tour-target {
  position: relative !important;
  z-index: 10002 !important;
  scroll-margin-top: 76px;
  outline: 3px solid var(--primary) !important;
  outline-offset: 5px;
  box-shadow: 0 0 0 9px rgba(79, 124, 255, .16) !important;
}

.demo-tour-panel {
  position: fixed;
  z-index: 10010;
  width: min(380px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .34);
}

.demo-tour-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.demo-tour-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-tour-title {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.demo-tour-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.demo-tour-close:hover,
.demo-tour-close:focus-visible {
  background: var(--bg-hover);
  color: var(--text);
  outline: none;
}

.demo-tour-body { padding: 15px 16px 8px; }

.demo-tour-body p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.demo-tour-points {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.demo-tour-points li {
  position: relative;
  margin: 7px 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.demo-tour-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.demo-tour-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 12px 16px 0;
}

.demo-tour-progress span {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}

.demo-tour-progress span.done { background: var(--primary); }

.demo-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 16px;
}

.demo-tour-actions-left,
.demo-tour-actions-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 760px) {
  .demo-tour-help { right: 12px; bottom: 12px; }
  .demo-tour-panel {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 8px !important;
    width: auto;
    max-height: min(72vh, 590px);
  }
  .demo-tour-actions { align-items: stretch; }
  .demo-tour-actions-right { margin-left: auto; }
  .demo-tour-target { outline-offset: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-tour-panel,
  .demo-tour-target,
  .demo-tour-help { scroll-behavior: auto; transition: none; }
}
