.cfap-tour-launcher {
  position: fixed;
  z-index: 1000;
  top: max(72px, calc(env(safe-area-inset-top) + 56px));
  right: max(20px, env(safe-area-inset-right));
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  background: #fff;
  color: #171717;
  font: 500 13px/1.4 system-ui, sans-serif;
  cursor: pointer;
}
.cfap-tour-launcher[hidden] { display: none; }
body:has(.cfap-tour[open]) .cfap-tour-launcher { visibility: hidden; }
html:has(.cfap-tour[open]) { overscroll-behavior: none; }

.cfap-tour {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #171717;
  animation: cfap-tour-fade 180ms ease-out both;
}
.cfap-tour-shield {
  position: absolute;
  inset: 0;
  touch-action: none;
}
.cfap-tour::backdrop { background: transparent; }
.cfap-tour-no-target { background: rgb(0 0 0 / 35%); }
.cfap-tour [hidden] { display: none; }
.cfap-tour-leaving { animation: cfap-tour-fade-out 180ms ease-in both; }
@keyframes cfap-tour-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes cfap-tour-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cfap-tour { animation: none; }
}

.cfap-tour-safe {
  position: absolute;
  inset: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  pointer-events: none;
}
.cfap-tour-spotlight {
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 0 0 200vmax rgb(0 0 0 / 35%);
  pointer-events: none;
}
.cfap-tour-card {
  position: absolute;
  box-sizing: border-box;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 24px rgb(0 0 0 / 8%);
}
.cfap-tour-card:is([data-arrow="top"], [data-arrow="bottom"])::before {
  position: absolute;
  left: calc(var(--cfap-tour-arrow) - 5px);
  width: 10px;
  height: 10px;
  background: #fff;
  transform: rotate(45deg);
  content: "";
  pointer-events: none;
}
.cfap-tour-card[data-arrow="top"]::before { top: -4px; }
.cfap-tour-card[data-arrow="bottom"]::before { bottom: -4px; }
.cfap-tour-content {
  position: relative;
  box-sizing: border-box;
  padding: 20px;
  border-radius: inherit;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.cfap-tour-progress {
  margin: 0 0 8px;
  color: #777;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .5px;
}
.cfap-tour #cfap-tour-title {
  margin: 0 0 6px;
  color: #171717;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}
.cfap-tour #cfap-tour-description {
  margin: 0;
  color: #626262;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.cfap-tour-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}
.cfap-tour-navigation {
  display: flex;
  gap: 6px;
}
.cfap-tour .cfap-tour-actions button {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  box-shadow: none;
  color: #777;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  touch-action: manipulation;
  cursor: pointer;
}
.cfap-tour .cfap-tour-actions .cfap-tour-skip { padding-left: 0; }
.cfap-tour .cfap-tour-actions .cfap-tour-next {
  min-width: 64px;
  border-radius: 6px;
  background: #171717;
  color: #fff;
}
.cfap-tour button:focus-visible, .cfap-tour-launcher:focus-visible {
  outline: 2px solid #626262;
  outline-offset: 2px;
}
