/* ===============================
   全体リセット
=============================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Georgia", serif;
  background: #000;
  color: #333;
  overflow: hidden;
}

/* ❌ 削除：モーダル殺してたやつ */
/* button, .close, .modal, [aria-label="close"] {
  display: none !important;
} */

/* ===============================
   ビューポート額縁
=============================== */
#viewport-frame {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}

/* ===============================
   ステージ
=============================== */
#stage {
  position: relative;
  width: 1536px;
  height: 1024px;
  transform-origin: center center;
  transform: scale(
    min(
      calc(100vw / 1536),
      calc(100vh / 1024)
    )
  );
}

/* ===============================
   背景
=============================== */
#bg-wrap {
  position: static;
  inset: 0;
  z-index: 0;
  /* 🔥 ここ直した */
  pointer-events: auto;
}

#bg-image {
  position: fixed;   /* ←追加 */
  inset: 0;          /* ←追加 */
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;       /* ←背面へ */
}

#bg-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(0,0,0,0.35) 100%
  );
  pointer-events: none; /* ← 必須 */
  z-index: 1;           /* ← 下げる */
}

/* ===============================
   ホットスポット
=============================== */
.hotspot {
  position: absolute;
  z-index: 30;
  cursor: pointer;
}

/* ラベル */
.label-paper {
  position: absolute;
  top: -1.8em;
  left: 0;
  font-size: 18px;
  padding: 6px 14px;
  background: #fffdf5;
  color: #222;
  border-radius: 10px;
  border: 2px solid rgba(120, 90, 40, 0.6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  white-space: nowrap;
  pointer-events: none;
}

/* 座標 */
.bookshelf { left: 1.3%; top: 25.4%; width: 19.5%; height: 41%; }
.painting  { right: 11.7%; top: 27.3%; width: 13%; height: 21.5%; }
.cup       { right: 7.8%; bottom: 9.8%; width: 7.8%; height: 15.6%; }
.chair     { left: 5.2%; bottom: 7.8%; width: 20.8%; height: 19.5%; }
.baum      { left: 24.7%; top: 41%; width: 7.8%; height: 15.6%; }
.master    { right: 19.5%; top: 41%; width: 13%; height: 25.4%; }

/* ===============================
   UI
=============================== */
header, .today-section, .game-cards {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
}

header {
  top: 12%;
  width: 72%;
  max-width: 1100px;
  padding: 20px 32px;
  background: rgba(68,44,0,0.75);
  color: #fff;
}

h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(48px, 5vw, 72px);
  margin: 0;
}

/* ===============================
   今日のおすすめ
=============================== */
.today-section {
  top: 38%;
  width: 1100px;
  text-align: center;
}

.today-section h2 {
  display: inline-block;
  font-family: "Schoolbell", cursive;
  font-size: 40px;
  padding: 10px 28px;
  background: rgba(30,45,30,0.85);
  color: #f7f5ef;
  border-radius: 12px;
}

/* ===============================
   カード
=============================== */
.game-cards {
  top: 52%;
  width: 1100px;
  display: flex;
  justify-content: center;
  gap: 32px;
}

.game-card {
  width: 320px;
  padding: 16px;
  background: #fdf5e6;
  border-radius: 14px;
  box-shadow: 4px 6px 15px rgba(0,0,0,0.35);
}

.game-card img {
  width: 100%;
}

/* ===============================
   吹き出し
=============================== */
.speech-bubble {
  position: absolute;
  right: 20%;
  top: 25%;
  background: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  display: none;
  z-index: 9999; /* ← これ */
}

.speech-bubble.show {
  display: block;
}

/* ===============================
   モーダル
=============================== */
.diary-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 9999; /* ← 超重要 */
}

.diary-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
}

/* ===============================
   妖精
=============================== */
.fairy {
  position: fixed;
  border-radius: 50%;
  pointer-events: auto;
  z-index: 999;
  transition: 2s;
}

/* ===============================
   スマホ
=============================== */
@media (max-width: 768px) {
  body { overflow-y: auto; }

  #viewport-frame {
    position: static;
    display: block;
  }

  #stage {
    transform: scale(calc(100vw / 1536));
    transform-origin: top center;
  }

  header, .today-section, .game-cards {
    position: static;
    transform: none;
    width: 100%;
    margin: 16px auto;
  }
}
