/* 背景のスクロール抑止 */
body.rep-modal-open { overflow: hidden; }

/* モーダル全体 */
#rep-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

/* オーバーレイ */
#rep-exit-modal .rep-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
}

/* ダイアログ */
#rep-exit-modal .rep-modal__dialog {
  position: relative;
  max-width: 640px;
  width: calc(100% - 24px);
  margin: 6vh auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  overflow: hidden;
}

/* 閉じる(X) */
#rep-exit-modal .rep-modal__close {
  position: absolute; right: 8px; top: 8px;
  background: transparent; border: 0; font-size: 28px; line-height: 1;
  cursor: pointer;
}

/* 本文 */
#rep-exit-modal .rep-modal__body {
  padding: 12px 12px 0;
  text-align: center;
}
#rep-exit-modal img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* フッター */
#rep-exit-modal .rep-modal__footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px;
  border-top: 1px solid #eee;
}

.rep-btn {
  appearance: none;
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.rep-btn--primary { background: #f44336; color: #fff; }
.rep-btn--secondary { background: #f3f4f6; color: #111827; }
.rep-btn--primary:hover { opacity: 0.9; }
.rep-btn--secondary:hover { background: #e5e7eb; }
#rep-exit-modal .rep-modal__footer .rep-btn--primary {
    flex: 1 1 auto;             /* 残りスペースを全部取る */
    width: 100%;                 /* anchorでも幅を満たす */
    text-align: center;          /* 文字を中央寄せ */
    display: inline-block;       /* 既定から明示 */
  }
  
  /* 2) 閉じるボタンは自然な最小幅のまま */
  #rep-exit-modal .rep-modal__footer .rep-btn--secondary {
    flex: 0 0 auto;
    white-space: nowrap;         /* 折り返さずコンパクトに */
  }
  
  /* （任意）ボタンの高さを揃えたい時 */
  #rep-exit-modal .rep-modal__footer .rep-btn {
    box-sizing: border-box;
  }