* {
  box-sizing: border-box;
}
/* ===== レイアウト ===== */
.modal_innner {
  width: 90%;
  margin: 0 auto;
}

.modal_ttl {
  width: 150px;
}
.modal_img {
  margin: 1rem auto 1.5rem;
  width: 95%;
}
.modal_txt {
  background: #f1f1e9;
  border-radius: 6px;
  padding: 1rem;
}
.gekiha {
  font-weight: bold;
  border: 1px solid #333;
  padding: 0.2rem 0.5rem;
  margin-top: 0.5rem;
}
body {
  margin: 0;
}

body.is-locked {
  overflow: hidden;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}
/* ===== modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal.is-closing {
  opacity: 0;
}

/* 480中央 */
.modal__inner {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  margin: 0 auto;
}

/* 背景 */
.modal__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.modal__bg.bg1 {
  background: #377f57 url('../_img/popup_bg2.svg') center / 300% no-repeat;
}

.modal__bg.bg2 {
  background: #296c8b url('../_img/popup_bg1.svg') center / 300% no-repeat;
}

/* 本体 */
.modal__panel {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;

  overflow-y: auto;
  overflow-x: hidden;

  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;

  -webkit-overflow-scrolling: touch;
}

/* 閉じる時 */
.modal.is-closing .modal__panel {
  transform: translateY(10px);
  opacity: 0;
}

/* ===== パネル背景切替 ===== */
.modal__panel.panel1 {
  color: #fff;
}

.modal__panel.panel2 {
  color: #fff;
}

/* クローズ */
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;

  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.modal__close img {
  width: 100%;
  display: block;
  pointer-events: none;
}

/* 中身 */
.modal__content {
  padding: 72px 20px 32px;
  margin: auto 0;
}

/* スマホ */
@media (max-width: 768px) {
  .modal__inner {
    max-width: 100%;
  }
}
