/* ============================================================
   Figma Component: main (node-id: 1:686)
   ============================================================ */

/* .main {
  background-color: #fee7bd;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  box-sizing: border-box;
  width: 100%;
  position: relative;
} */

/* ============================================================
   img_wrapper (node-id: 1:690)
   ============================================================ */

/* .img-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  align-content: flex-start;
  position: relative;
  width: 100%;
} */

/* ============================================================
   各画像アイテム (node-id: 1:687 / 1:688 / 1:689)
   ============================================================ */
/* 
.img-item {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.img-item--k8 {
  width: 181px;
  height: 180px;
}

.img-item--k14 {
  width: 181px;
  height: 181px;
}

.img-item--k3 {
  width: 180px;
  height: 181px;
}

.img-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  max-width: none;
}


 */


.popover-modal {
  position: fixed;
  inset: auto;            /* [popover]デフォルトの inset:0 をリセット */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: auto;
  max-height: calc(100vh - 48px);
  overflow-x: hidden;
  overflow-y: auto;       /* コンテンツが max-height を超えた時のみスクロール */
  padding: 24px;
  box-sizing: border-box; /* include padding in height calculation */
  background: linear-gradient(
    -45deg,
    #d0dff7 0%,
    #d0dff7 33%,
    #edf2fa 33%,
    #edf2fa 66%,
    #d0dff7 66%,
    #d0dff7 100%
  );
  z-index: 1000;
}


.popover-modal[hidden] {
  display: none;
}

.close-button-wrapper {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.popover-close {
  background: rgb(255, 255, 255);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid #d0dff7;
  border-radius: 100%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.popover-content {
  background: #fff;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  border-radius: 4px;
}

.pop-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  box-sizing: border-box;
  width: 100%;
  /* height: auto by default; remove forced 100% to avoid overflow */
  /* margin:auto not needed */
  & h1 {
    font-size: 1.5rem;
  }
  & h2 {
    font-size: 1.25rem;
    margin-top: 24px;
  }
}

/* ============================================================
  img_wrapper
  ============================================================ */
.img-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  align-content: flex-start;
  position: relative;
  width: 100%;
}
/* ============================================================
  各画像アイテム
  ============================================================ */
.img-item {
position: relative;
flex-shrink: 0;
overflow: hidden;
width: 181px;
height: 180px;
}

.img-item img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
pointer-events: none;
max-width: none;
}

/* ============================================================
  レスポンシブ対応（スマートフォン）
  ============================================================ */
@media (max-width: 600px) {
  .popover-modal {
    width: calc(100% - 24px);
    padding: 12px;
  }

  .popover-content {
    padding: 12px;
  }

  .pop-main {
    padding: 12px;

    & h1 {
      font-size: 1.2rem;
    }

    & h2 {
      font-size: 1.05rem;
      margin-top: 16px;
    }
  }

  .img-wrapper {
    gap: 8px;
  }

  .img-item {
    width: calc(50% - 4px);
    height: auto;
    aspect-ratio: 1;
  }
}