dialog.builder-tour {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(374px, calc(100vw - 24px));
  height: fit-content;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink, #1c221e);
}

/* Explicit top and left supplied by the tour override the centered default. */
dialog.builder-tour-positioned {
  right: auto;
  bottom: auto;
  margin: 0;
}

dialog.builder-tour::backdrop {
  background: rgb(23 28 24 / 68%);
  backdrop-filter: none;
}

dialog.builder-tour-anchored::backdrop {
  background: transparent;
}

.builder-tour-spotlight {
  position: fixed;
  z-index: 0;
  border: 2px solid var(--gold, #f6cb46);
  border-radius: 10px;
  box-shadow: 0 0 0 200vmax rgb(23 28 24 / 68%);
  pointer-events: none;
}

.builder-tour-card {
  position: relative;
  z-index: 1;
  max-height: var(--builder-tour-card-height, calc(100dvh - 24px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border: 1px solid var(--line, #e4e7e0);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgb(23 28 24 / 30%);
}

.builder-tour-header,
.builder-tour-actions,
.builder-tour-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder-tour-header,
.builder-tour-actions {
  justify-content: space-between;
}

.builder-tour-actions {
  flex-wrap: wrap;
}

.builder-tour-navigation {
  margin-left: auto;
}

.builder-tour-header span {
  font-size: 12px;
  font-weight: 750;
  color: #3c634a;
}

.builder-tour h2 {
  margin: 5px 0 8px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -.025em;
}

/* The heading receives focus so assistive technology reads each new step. */
.builder-tour h2:focus {
  outline: none;
}

.builder-tour p {
  margin: 0 0 16px;
  color: #424c45;
  line-height: 1.5;
}

.builder-tour button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  padding: 0 10px;
}

.builder-tour [data-tour-skip],
.builder-tour [data-tour-guide] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.builder-tour [data-tour-back] {
  border-color: #cbd1c9;
}

.builder-tour [data-tour-next] {
  background: var(--gold, #f6cb46);
  color: #1c221e;
}

.builder-tour-pointer {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  background: #fff;
  border: solid var(--line, #e4e7e0);
  border-width: 1px 0 0 1px;
  pointer-events: none;
}

.builder-tour-pointer[data-side="top"] {
  top: -6px;
  left: calc(var(--builder-tour-pointer-offset) - 6px);
  transform: rotate(45deg);
}

.builder-tour-pointer[data-side="bottom"] {
  bottom: -6px;
  left: calc(var(--builder-tour-pointer-offset) - 6px);
  transform: rotate(225deg);
}

.builder-tour-pointer[data-side="left"] {
  top: calc(var(--builder-tour-pointer-offset) - 6px);
  left: -6px;
  transform: rotate(-45deg);
}

.builder-tour-pointer[data-side="right"] {
  top: calc(var(--builder-tour-pointer-offset) - 6px);
  right: -6px;
  transform: rotate(135deg);
}
