/* ==========================================================
  ステージ（キャラクター・SNS・紹介文）
   ========================================================== */
.stage {
  position: relative;
  text-align: center;
  padding: 10px 6% 30px;
  max-width: 720px;
  margin: 0 auto;
}
.separators{
  width: auto;
  height: 300px;                              /* 表示したい高さを指定 */
  background-image: url("../images/separators.png");
  background-size: cover;  
  position: relative;
  margin-top: -30px;
}
.caurce1{
  position: relative;
  display: flex;
  height: 800px;
  margin-left: 60%;
  top: -500px; 
  z-index: -1;
}
.img {
  display: block;
  margin: -70px auto -150px;
  margin-right: -10%;
  filter: drop-shadow(0 12px 14px rgba(92, 44, 13, 0.35));
  animation: takoyak_player 4s ease-in-out infinite;
  cursor: pointer;
  position: relative; /* z-indexを効かせるために必要 */
  z-index: 0;         /* モデルより大きい数値にする */
}
@keyframes takoyak_player {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(32px); }
}
.model{
  width: clamp(30px, 40vw, 350px);
  height: clamp(30px, 40vw, 350px);
  display: flex;
  margin: -300px auto -50px;
  margin-left: -2%;
  filter: drop-shadow(0 12px 14px rgba(92, 44, 13, 0.35));
  width: 200px; 
  height: 300px;
}
/* 画面幅が600px以下(スマホなど)の時だけ、この内容で上書きする */
@media (max-width: 900px) {
  .model {
    margin-left: -25%;    /* -30%の左ズレを打ち消して中央に戻す */
    margin-top: -150px;   /* -300pxだと小さい画面では上に行き過ぎるため調整 */
    width: 200px; 
    height: 300px;
  }
}
.body_title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--terracotta-deep);
  margin: 0 0 28px;
  margin-top: -200px;
}
.body_title span {
  font-family: var(--font-pixel); 
  font-size: 0.55em; 
  display: block; 
  margin-top: 6px; 
}

/* 串団子風 SNS リンク（signature element） */
.skewer {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 20px 0 6px;
}
.skewer_stick {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 4px;
  background: linear-gradient(90deg, #d8a24a, #b97f34);
  border-radius: 2px;
  transform: translateY(-50%);
  z-index: 0;
}
.dango {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fffaf0, var(--dango-color) 65%);
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.25), 0 6px 10px rgba(92, 44, 13, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.dango svg { width: 24px; height: 24px; fill: #fff; }
.dango:hover, .dango:focus-visible { transform: translateY(-6px) scale(1.05); }

.skewer_caption {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--terracotta-deep);
  opacity: 0.8;
  margin: 4px 0 32px;
}

.body_text {
  font-size: 1rem;
  line-height: 1.3;
  color: var(--crust);
  font-weight: 600;
  position: relative; /* z-indexを効かせるために必要 */
  z-index: 10;         /* モデルより大きい数値にする */
}
.table_of_contents {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1vw, 2.2rem);
  color: var(--nori--terracotta-deep);
  margin: 10 0 36px;
}

/* ==========================================================
  マップ一覧
   ========================================================== */
.list {
  margin: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: local;      /* 背景を動かすか */
  background-image: url("../images/mayo_background.png");
  padding: 60px 6% 80px;
  text-align: center;
}
.list_title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--);
  margin: 0 0 36px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}
.card {
  display: block;
  background-image: url("../images/header_background.png");
  border: 1px solid rgba(184, 74, 21, 0.15);
  border-radius: 20px;
  padding: 16px;
  text-decoration: none;
  color: rgb(255, 234, 234);
  box-shadow: 0 6px 16px rgba(92, 44, 13, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(92, 44, 13, 0.16);
}
.card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 12px;
}
.card h3 {
  font-family: var(--font-display);
  color: rgb(48, 18, 0);
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.card p { 
  margin: 0; 
  font-size: 0.9rem; 
  opacity: 0.75; 
}
.card-model {
  width: 100%;
  height: 150px;
  border-radius: 14px;
  margin-bottom: 12px;
  background: #fff2e1;
}

/* ─────────────────────────────────────
  ここからポップアップ(モーダル)用のCSS
    ───────────────────────────────────── */
/* 画面全体を覆う、薄暗い背景 */
.modal-overlay {
  display: none;              /* 普段は非表示 */
  position: fixed;            /* スクロールしても画面に固定される */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* 黒の半透明 */
  align-items: center;
  justify-content: center;
  z-index: 100;                /* 他の要素より手前に表示する */
}

/* JavaScriptでこのクラスが付いた時だけ表示する */
.modal-overlay.active {
  display: flex;
}

/* ポップアップ本体の白い箱 */
.modal-box {
  background-image: url("../images/header_background.png");
  border-radius: 14px;
  padding: 24px;
  max-width: 720px;   /* ← 横幅の上限 */
  width: 90%;         /* ← 画面幅に対する割合 */
  max-height: 95vh;   /* ← 縦の上限(画面の高さの85%まで) */
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mayo);
  font-weight: bold;
}

.modal-box h2 {
  margin-top: 0;
  font-size: 20px;
  color: rgb(48, 18, 0);
}

.modal-box model-viewer {
  width: 100%;
  height: 460px;
  margin: 14px 0;
  background: #fff2e1;
  border-radius: 10px;
}