.ebei-modal[hidden] {
  display: none !important;
}

body.ebei-modal-open {
  overflow: hidden;
}

.ebei-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #17171c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
}

.ebei-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 20, 0.72);
}

.ebei-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px 24px 22px;
  border: 1px solid #e2e5eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  box-sizing: border-box;
}

.ebei-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dfe2e8;
  border-radius: 999px;
  background: #fff;
  color: #343741;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ebei-modal__close:focus-visible,
.ebei-modal__button:focus-visible {
  outline: 3px solid rgba(255, 47, 103, 0.35);
  outline-offset: 3px;
}

.ebei-modal__eyebrow {
  margin: 0 52px 6px 0;
  color: #d9164c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.ebei-modal__title {
  margin: 0 52px 8px 0;
  color: #121319;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
}

.ebei-modal__description {
  margin: 0 0 20px;
  color: #626775;
  font-size: 14px;
  line-height: 1.75;
}

.ebei-modal__ad-label {
  width: 300px;
  max-width: 100%;
  margin: 0 auto 5px;
  color: #818793;
  font-size: 11px;
  line-height: 1;
  text-align: left;
}

.ebei-modal__ad {
  display: grid;
  place-items: center;
  width: 300px;
  height: 250px;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: #f2f3f6;
}

.ebei-modal__ad-frame {
  display: block;
  width: 300px;
  height: 250px;
  margin: 0;
  border: 0;
  overflow: hidden;
}

.ebei-modal__ad-status {
  color: #838995;
  font-size: 12px;
}

.ebei-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  margin-top: 32px;
}

.ebei-modal__button {
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
}

.ebei-modal__button--cancel {
  border: 1px solid #dfe2e8;
  background: #fff;
  color: #343741;
}

.ebei-modal__button--continue {
  border: 1px solid #ff2f67;
  background: #ff2f67;
  color: #fff;
}

@media (max-width: 374px) {
  .ebei-modal {
    padding: 8px;
  }

  .ebei-modal__panel {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 20px 12px 16px;
    border-radius: 16px;
  }

  .ebei-modal__title {
    font-size: 21px;
  }

  .ebei-modal__actions {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ebei-modal,
  .ebei-modal * {
    scroll-behavior: auto !important;
  }
}
