body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

#blackout {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1000;
}

#goldenBeanContainer {
  position: fixed;
  bottom: 22vh; /* 女神の手元 */ 
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 1s;
  z-index: 860; /* 女神の前面 */
}

#goldenBean {
  width: 60px;
  animation: floatLoop 3s ease-in-out infinite;
}

@keyframes floatLoop {
  0% { transform: translateY(0); }
  50% { transform: translateY(15px); }
  100% { transform: translateY(0); }
}

#goddess {
  position: fixed;
  bottom: 12vh;  /* 女神の高さ調整 */
  left: 50%;
  transform: translateX(-50%);
  width: 280px;  /* 少し拡大 */
  opacity: 0;
  transition: all 1s ease-in-out;
  z-index: 850;  /* 台詞より上に */ 
}

/* ========= ダイアログ全体の調整 ========= */
.dialog {
  /* 可変幅に変更 */
  width: 90%;
  max-width: 400px;
  /* 画面の上下に余白を残す */
  max-height: 80vh;
  overflow-y: auto;       /* 中身がはみ出したらスクロール */
  box-sizing: border-box; /* padding を含めたサイズ計算に */
  padding: 1rem;
  left: 50%;
  top: 10vh;
  position: fixed;
  transform: translateX(-50%);
  background: #fff;
  color: #000;
  border-radius: 4px;
}

/* スマホ向け微調整 */
@media (max-width: 480px) {
  .dialog {
    max-width: 95vw;
    max-height: 70vh;
    padding: 0.8rem;
    font-size: 14px;
    top: 5vh;
  }
}

.dialog.system {
  background: rgba(0, 51, 204, 0.9);
  color: #fff;
  border-color: #66f;
  border-radius: 10px;
  opacity: 1;
  transition: opacity 0.3s ease;

}

.dialog.system.reveal-start {
  width: 2px;
  height: 0;
  opacity: 1;
  transition: width 0.3s ease, height 0.3s ease 0.3s;
}

.dialog.system.reveal-expand {
  width: 80%;
  height: 7rem;
  transition: width 0.4s ease, height 0.4s ease;
}

.dialog.system.collapse {
  width: 2px;
  height: 0;
  transition: height 0.3s ease, width 0.3s ease 0.3s;
}

.hidden {
  display: none;
}

/* 波紋（ripple） */
.ripple {
  position: fixed;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  z-index: 840;
}

.ripple-active {
  animation: rippleExpand 1.2s ease-out forwards;
}

@keyframes rippleExpand {
  0% {
    width: 0px;
    height: 0px;
    opacity: 1;
  }
  80% {
    width: 300px;
    height: 300px;
    opacity: 0.3;
  }
  100% {
    width: 400px;
    height: 400px;
    opacity: 0;
  }
}



#auraRing {
  position: fixed;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 150, 0.6), rgba(255, 255, 0, 0) 70%);
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 845;
  animation: auraPulse 3s ease-in-out infinite;
}

@keyframes auraPulse {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-50%) scale(1.1);
    opacity: 0.9;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.5;
  }
}


.ripple {
  position: fixed;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  z-index: 840;
}

.ripple-active {
  animation: rippleExpand 1.2s ease-out forwards;
}

@keyframes rippleExpand {
  0% {
    width: 0px;
    height: 0px;
    opacity: 1;
  }
  80% {
    width: 300px;
    height: 300px;
    opacity: 0.3;
  }
  100% {
    width: 400px;
    height: 400px;
    opacity: 0;
  }
}