/* ===== ベース ===== */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f6f6f6;
}

.common-btn {
  display: block;
  padding: .8rem 0;
  border-radius: 999px;
  margin: 0 auto;
	text-align: center;
  text-decoration: none;
  background: #00a1b5;
  color: #fff;
  font-weight: 700;
  transition: opacity .2s ease;
}
.common-btn:hover { opacity: .9; }

/* ===== モーダル全体 ===== */
.modal[aria-hidden="true"] { display: none; }
.modal[aria-hidden="false"] { display: block; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity .25s ease;
}
.modal__dialog {
  position: relative;
  display: grid;
  place-items: center;
  height: 100dvh;
  padding: 2rem;
}

/* ===== モーダルボックス ===== */
.modal__content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  width: min(800px, 90vw);
  max-height: 85dvh;
  overflow: hidden;
  transform: translateY(10px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.modal.is-open .modal__overlay { opacity: 1; }
.modal.is-open .modal__content { transform: translateY(0); opacity: 1; }

/* ===== 内側スクロール ===== */
.modal__inner {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(85dvh - 1rem);
  box-sizing: border-box;
}
.modal__inner img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-top: 1rem;
  display: block;
}

/* ===== ✕ボタン（外レイヤー配置） ===== */
.modal__close {
  position: absolute;
  top: calc(50% - 35vh);   /* モーダルの上端に合わせて浮かせる */
  right: calc(50% - 370px); /* モーダル幅800pxの右端に揃う */
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 20; /* モーダルより前面に出す */
  transition: background 0.2s ease;
}
.modal__close:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* ===== 背景スクロール固定 ===== */
html.modal-open { overflow: hidden; }

/* ===== スマホ対応 ===== */
@media (max-width: 600px) {
  .modal__dialog { padding: 1.5rem; }
  .modal__content {
    width: 92vw;
    max-height: 88dvh;
    border-radius: 16px;
  }
  .modal__inner { padding: 1.5rem; }
  .modal__close {
    top: calc(50% - 46vh);
    right: calc(50% - 46vw);
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}
