.header-img {
  position: relative; 
  width: 110%;
  height: 100px; 
}
.container {
  position: relative; 
  height: 3100px; 
}

.background-image {
  position: absolute;
  top: -10;
  left: 0;
  width: 110%;
  height: -50%;
  z-index: 1;
}

.overlay-image {
  position: absolute;
  top: 110px; 
  left: 10px;
  width: 400px; 
  z-index: 2; /* 前景なので上 */
}

.overlay-image2 {
  position: absolute;
  top: 600px; /* 上から50px */
  left: 90px; /* 左から50px */
  width: 230px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image3 {
  position: absolute;
  top: 800px; /* 上から50px */
  left: -5px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image4 {
  position: absolute;
  top: 1170px; /* 上から50px */
  left: -5px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image5 {
  position: absolute;
  top: 1520px; /* 上から50px */
  left: -5px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image6 {
  position: absolute;
  top: 1900px; /* 上から50px */
  left: -5px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image7 {
  position: absolute;
  top: 2500px; /* 上から50px */
  left: -5px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image8 {
  position: absolute;
  top: 2650px; /* 上から50px */
  left: -5px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image9 {
  position: absolute;
  top: 2900px; /* 上から50px */
  left: -5px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}

.overlay-image10 {
  position: absolute;
  top: 3250px; /* 上から50px */
  left: 3px; /* 左から50px */
  width: 400px; /* サイズ調整 */
  z-index: 2; /* 前景なので上 */
}
.container{
  position: relative;
}

/* カルーセルを「背景の上」に重ねる */
.carousel{
  position: absolute;
  /* ここで配置調整（%だと背景に対して崩れにくい） */
  top: 65%;
  left: 53%;
  transform: translateX(-50%);
  width: 110%;
  z-index: 50;

  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 10px;
}

.carousel-viewport{
  width: 100%;
  aspect-ratio: 1 / 1; /* 正方形枠（必要なら変える） */
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
  overflow: hidden;
}

.carousel-viewport img{
  width: 100%;
  height: 100%;
  object-fit: cover; /* coverにするとトリミングされる */
  display: block;
}

/* 左右ボタン */
.carousel-btn{
  height: 60px;
  border: 0;
  border-radius: 500px;
  background: rgba(255, 115, 0, 0.45);
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

.carousel-btn:active{
  transform: scale(0.98);
}

/* 画像ボタン */
.link-button{
  position: absolute;
  /* カルーセルの下に来るように調整 */
  top: 75%;          /* ←ここ微調整 */
  left: 53%;
  transform: translateX(-50%);
  width: 70%;
  z-index: 50;

  display: block;
}

.link-button img{
  width: 100%;
  height: auto;
  display: block;
}

/* 押せる感（任意） */
.link-button:active{
  transform: translateX(-50%) scale(0.97);
}

#ghostOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  transition: opacity .4s ease;
}

#ghostOverlay.is-cleared{
  opacity: 0;
  pointer-events: none;
}

#ghostField{
  position: absolute;
  inset: 0;
}

/* お化け1体 */
.ghost{
  position: absolute;
  width: 150px;           /* サイズは調整OK */
  height: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;

  transition: transform .2s ease, opacity .2s ease;
  animation: float 2.6s ease-in-out infinite;
}

.ghost:active{
  transform: scale(0.95);
}

.ghost.is-cleared{
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.ghost-text{
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-size: 14px;
  opacity: .85;
}

@keyframes float{
  0%{ transform: translateY(0); }
  50%{ transform: translateY(-10px); }
  100%{ transform: translateY(0); }
}

.sparkle{
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe9a8 40%, transparent 70%);
  pointer-events: none;
  animation: sparkle-fly .6s ease-out forwards;
}

@keyframes sparkle-fly{
  from{
    opacity: 1;
    transform: translate(0,0) scale(1);
  }
  to{
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.2);
  }
}