/* ==============================
   Trio+ Know（クイズ・雑学）専用CSS
   Version: 2025-10-09 / 基準: style_20251009.css
============================== */

/* ------------------------------
   地図エリア
------------------------------ */
#map-area {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 30px auto;
  text-align: center;
}
#map-area svg {
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
  margin: 0 auto;
}
svg path {
  fill: #ebeced;
  stroke: #fff;
  vector-effect: non-scaling-stroke;
  transition: fill 0.15s ease;
  cursor: pointer;
}
svg path:hover {
  fill: #f59e0b;
}
svg path.is-active {
  fill: #f59e0b !important;
  stroke: #fff !important;
  stroke-width: 2px;
}

/* ------------------------------
   切替ボタン（全国／拡大／県名）
------------------------------ */
.map-controls {
  margin-bottom: 12px;
  text-align: center;
}
.map-controls .map-btn {
  background: #f3f4f6;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: 0 4px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.map-controls .map-btn.active {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}

/* ------------------------------
   クイズ設問ボックス
------------------------------ */
#quiz-play-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 40px;
}
.quiz-header {
  width: 90%;
  max-width: 800px;
  text-align: center;
  margin: 0 auto 8px auto;
}
.quiz-header h2 {
  border: none !important;
  font-size: 1.3rem;
  margin-bottom: 0.5em;
}
.quiz-questions {
  width: 90%;
  max-width: 800px;
  margin: 12px auto 20px auto;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 2;
}
.quiz-no {
  font-weight: bold;
  color: #f97316;
  margin-right: 10px;
}
.quiz-description {
  flex: 1;
  text-align: left;
  font-size: 1.05em;
}
.quiz-answer-btn {
  background: #f97316;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 1em;
  cursor: pointer;
  opacity: 0.9;
  transition: 0.2s;
}
.quiz-answer-btn:hover:enabled {
  opacity: 1;
  background: #ea580c;
}

/* ------------------------------
   県名リスト（都道府県名回答）
------------------------------ */
.pref-list-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(8, 1fr);
}
@media (max-width: 768px) {
  .pref-list-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.pref-list-grid button {
  padding: 6px 4px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.pref-list-grid button:hover {
  background: #fef3c7;
}
.pref-list-grid button.is-active {
  background: #f59e0b !important;
  color: #fff !important;
  border-color: #d97706 !important;
  font-weight: 700;
}

/* ------------------------------
   結果画面（採点）
------------------------------ */
.result-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}
.result-row {
  display: grid;
  grid-template-columns: 7fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
}
.result-question {
  font-size: 14px;
}
.result-mark {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}
.result-comment {
  margin-top: 16px;
  font-weight: bold;
  font-size: 16px;
}
.result-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.result-buttons button {
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  cursor: pointer;
  transition: 0.2s;
}
.result-buttons button:hover {
  opacity: 0.85;
}

/* ------------------------------
   ポップアップ（正誤判定）
------------------------------ */
.quiz-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.quiz-popup .popup-content {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}
.quiz-popup.correct .popup-content { border: 2px solid green; }
.quiz-popup.incorrect .popup-content { border: 2px solid red; }

/* ------------------------------
   雑学カテゴリ（trivia.js）
------------------------------ */
.trivia-controls {
  text-align: center;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.trivia-btn {
  background: #fff;
  border: 1px solid #f59e0b;
  color: #b45309;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 700;
}
.trivia-btn.active {
  background: #f59e0b;
  color: #fff;
}
.trivia-detail-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fffaf3;
}
.trivia-detail-box img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

/* ------------------------------
   スマホ対応
------------------------------ */
@media (max-width: 600px) {
  .quiz-questions {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .quiz-description {
    text-align: center;
  }
  .quiz-answer-btn {
    align-self: center;
    width: 100%;
    margin-top: 10px;
  }
}