.step-plan-trigger {
  cursor: pointer;
}

.step-plan-trigger:focus-visible {
  outline: 3px solid rgba(111, 33, 255, 0.45);
  outline-offset: 4px;
  border-radius: 4px;
}

html.step-plan-modal-open,
body.step-plan-modal-open {
  overflow: hidden !important;
}

.step-plan-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 18, 28, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.step-plan-modal.is-open {
  display: flex;
}

.step-plan-modal__dialog {
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100vw - 40px));
  height: min(900px, calc(100dvh - 40px));
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.step-plan-modal__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 12px 10px 22px;
  border-bottom: 1px solid #e8e8ee;
  background: #fff;
}

.step-plan-modal__title {
  margin: 0;
  color: #222331;
  font: 600 20px/1.25 Arial, sans-serif;
}

.step-plan-modal__close {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #292936;
  background: #f2f2f6;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font: 400 34px/1 Arial, sans-serif;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.step-plan-modal__close:hover {
  background: #e5e5ec;
  transform: scale(1.04);
}

.step-plan-modal__close:focus-visible {
  outline: 3px solid rgba(111, 33, 255, 0.45);
  outline-offset: 2px;
}

.step-plan-modal__frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #f5f7fa;
}

@media (max-width: 700px) {
  .step-plan-modal {
    padding: 0;
    background: #fff;
  }

  .step-plan-modal__dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .step-plan-modal__header {
    min-height: 60px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px 16px;
  }

  .step-plan-modal__title {
    padding-right: 8px;
    font-size: 16px;
  }

  .step-plan-modal__close {
    flex-basis: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-plan-modal__close {
    transition: none;
  }
}
