/* ===============================
   ベースレイアウト
=============================== */

/* body は画面全体を持つ（max-width を外す） */
body {
  font-family: "Helvetica Neue", sans-serif;
  background: #f0f8ff;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding-top: 60px; /* ← ステータスバー35px + 余白25px */
}

/* 中央寄せのラッパー（元の body の役割） */
#page-wrapper {
  max-width: 800px;
  margin: auto;
  padding: 20px;
}

h1, h2, h3 {
  text-align: center;
  color: #0077b6;
}

/* ===============================
   クイズ・パビリオン
=============================== */

.pavilion {
  margin-bottom: 30px;
  padding: 10px;
  border: 2px solid #00aaff;
  border-radius: 12px;
  background: #e0f7ff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.question-title {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 10px;
}

label {
  display: block;
  padding: 8px;
  margin: 2px 0;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

label:hover {
  background: #f0f8ff;
}

input[type="radio"] {
  margin-right: 10px;
  transform: scale(1.2);
}

input[type="text"] {
  font-size: 1.1em;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

button {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1.1em;
  background: #00aaff;
  color: white;
  border: none;
  border-radius: 8px;
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #0077b6;
}

.result {
  margin-top: 10px;
  font-weight: bold;
  color: #007700;
}

.stamp {
  margin-top: 40px;
  padding: 20px;
  background: #ffffff;
  border: 2px dashed #00aaff;
  border-radius: 12px;
}

.stamp ul {
  list-style: none;
  padding-left: 0;
}

.stamp li {
  padding: 6px 0;
  font-size: 1.1em;
}

@media (max-width: 600px) {
  #page-wrapper {
    padding: 10px;
  }

  .pavilion, .stamp {
    padding: 16px;
  }

  button {
    font-size: 1em;
    padding: 12px;
  }

  label {
    font-size: 1em;
    padding: 10px;
  }
}

/* ===============================
   ストーリー吹き出し
=============================== */

#story-box {
  position: fixed;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 2px solid #0077b6;
  border-radius: 12px;
  padding: 16px 20px;
  width: 70%;
  max-width: 800px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1950;
}

#story-box::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 40px;
  border-width: 10px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

#story-text {
  font-size: 1.1em;
  margin-bottom: 10px;
}

#next-button {
  background: #00aaff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
}

.quiz-block {
  margin: 16px 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* ===============================
   ステータスバー（固定）
=============================== */

#status-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 35px; /* ← ひでの要望どおり */
  background: #003566;
  color: white;
  padding: 6px 12px;
  font-size: 17px;
  z-index: 2000;
  display: flex;
  align-items: center;
}

#status-bar.hidden {
  display: none;
}

/* ===============================
   地図（map.css と整合）
=============================== */

#map {
  position: fixed;
  top: 35px; /* ← ステータスバーの高さ */
  left: 0;
  width: 100%;
  height: calc(100vh - 35px);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 999;
}

#map.visible {
  opacity: 1;
  pointer-events: auto;
}

#map-ui {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: auto;
  height: 50vh;
  background: rgba(255,255,255,0.95);
  border-top: 3px solid #0077b6;
  padding: 20px;
  z-index: 1000;
  display: none;
}

#map-ui.show {
  display: block;
}

/* ===============================
   ストーリー時の暗幕
=============================== */

#screen-dim {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 1900;
  display: none;
}
