body.driver-active .driver-overlay {
  z-index: 1000000 !important;
}

.driver-popover.new-worlds-onboarding {
  box-sizing: border-box;
  width: min(340px, calc(100vw - 24px));
  min-width: 0;
  max-width: 340px;
  padding: 18px;
  border: 1px solid rgba(120, 255, 236, 0.72);
  border-radius: 14px;
  background: rgba(8, 8, 8, 0.96);
  color: var(--text-white-solid, #fff);
  font-family: var(--font-system, Arial, Helvetica, sans-serif);
  font-size: var(--type-body, 16px);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.58);
}

.new-worlds-onboarding .driver-popover-title {
  color: var(--text-emerald-solid, #78ffec);
  font-size: var(--type-section-title, 20px);
  line-height: 1.3;
}

.new-worlds-onboarding .driver-popover-description {
  color: var(--text-white-solid, #fff);
  font-size: var(--type-body-compact, 15px);
  line-height: 1.5;
}

.new-worlds-onboarding .driver-popover-footer {
  gap: 12px;
  margin-top: 16px;
}

.new-worlds-onboarding .driver-popover-progress-text {
  color: var(--text-white-secondary, rgba(255, 255, 255, 0.72));
  font-size: var(--type-small, 12px);
  white-space: nowrap;
}

.new-worlds-onboarding .driver-popover-footer-btn {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(120, 255, 236, 0.62);
  border-radius: 8px;
  background: rgba(159, 83, 43, 0.95);
  color: var(--text-emerald-solid, #78ffec);
  font-size: var(--type-button-sm, 14px);
  font-weight: 800;
  text-shadow: none;
}

.new-worlds-onboarding .driver-popover-footer-btn:hover,
.new-worlds-onboarding .driver-popover-footer-btn:focus-visible {
  border-color: #78ffec;
  background: #9f532b;
  outline: 2px solid rgba(120, 255, 236, 0.45);
  outline-offset: 2px;
}

/* На шагах 2–7 кнопка «Назад» получает фокус автоматически. Оставляем её
   штатную рамку, но убираем дополнительный контур вокруг неё. */
.new-worlds-onboarding .driver-popover-prev-btn:focus-visible {
  outline: none;
  outline-offset: 0;
}

.new-worlds-onboarding.driver-popover-side-left .driver-popover-arrow {
  border-left-color: rgba(8, 8, 8, 0.96);
}

.new-worlds-onboarding.driver-popover-side-right .driver-popover-arrow {
  border-right-color: rgba(8, 8, 8, 0.96);
}

.new-worlds-onboarding.driver-popover-side-top .driver-popover-arrow {
  border-top-color: rgba(8, 8, 8, 0.96);
}

.new-worlds-onboarding.driver-popover-side-bottom .driver-popover-arrow {
  border-bottom-color: rgba(8, 8, 8, 0.96);
}

@media (max-width: 560px) {
  .driver-popover.new-worlds-onboarding {
    width: min(320px, calc(100vw - 16px));
    padding: 14px;
    border-radius: 12px;
  }

  .new-worlds-onboarding .driver-popover-title {
    font-size: var(--type-section-title, 18px);
  }

  .new-worlds-onboarding .driver-popover-description {
    font-size: var(--type-body-compact, 14px);
    line-height: 1.4;
  }

  .new-worlds-onboarding .driver-popover-footer {
    margin-top: 12px;
  }
}

@media (max-height: 520px) {
  .driver-popover.new-worlds-onboarding {
    max-width: min(430px, calc(100vw - 16px));
    padding: 10px 14px;
  }

  .new-worlds-onboarding .driver-popover-title {
    font-size: var(--type-section-title, 16px);
  }

  .new-worlds-onboarding .driver-popover-description {
    font-size: var(--type-body-compact, 12px);
    line-height: 1.3;
  }

  .new-worlds-onboarding .driver-popover-footer {
    margin-top: 8px;
  }

  .new-worlds-onboarding .driver-popover-footer-btn {
    min-height: 32px;
    padding: 5px 10px;
    font-size: var(--type-button-sm, 12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.driver-active {
    --driver-animation-duration: 0ms !important;
  }
}
