/* ===== まるばつデイリークイズ(オーバーレイ)===== */
.quiz-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(4, 8, 22, 0.78); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.18s ease;
}
.quiz-overlay.is-open { opacity: 1; }

.quiz-panel {
  position: relative; width: 100%; max-width: 440px;
  max-height: 92vh; overflow-y: auto;
  border-radius: 22px; padding: 22px 18px 20px;
  background: linear-gradient(165deg, rgba(20, 27, 52, 0.98), rgba(11, 15, 34, 0.99));
  border: 1px solid var(--border-glow, rgba(99, 102, 241, 0.5));
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.28);
}
.quiz-close {
  position: absolute; top: 10px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: rgba(0, 0, 0, 0.35); color: var(--text-dim, #9fb0d0);
  font-size: 16px; cursor: pointer; line-height: 1;
}
.quiz-close:active { transform: scale(0.92); }
.quiz-msg { text-align: center; color: var(--text-dim); padding: 30px 10px; }

/* イントロ */
.quiz-intro, .quiz-result { text-align: center; padding: 8px 4px 2px; }
.quiz-emoji { font-size: 52px; line-height: 1; margin-bottom: 8px; filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.5)); }
.quiz-title { font-size: 19px; font-weight: 900; margin-bottom: 14px; letter-spacing: 0.02em; }
.quiz-rules {
  display: grid; gap: 8px; text-align: left;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; margin: 0 auto 14px; max-width: 320px;
  font-size: 13.5px; font-weight: 700; color: #dbe4ff;
}
.quiz-rule b { color: #fff; }
.quiz-coin { color: var(--yellow, #ffc14d) !important; }
.quiz-note { font-size: 12px; color: var(--text-dim); font-weight: 700; margin: 6px 0 14px; }
.quiz-start { margin-top: 4px; }

/* 出題 */
.quiz-play { padding: 2px 2px 4px; }
.quiz-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.quiz-qno { font-size: 13px; font-weight: 900; color: var(--cyan, #22d3ee); }
.quiz-cat {
  font-size: 11px; font-weight: 800; color: var(--text-dim);
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(0, 0, 0, 0.25);
}
.quiz-timer {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.1); margin-bottom: 16px;
}
.quiz-timer-fill {
  display: block; width: 100%; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan, #22d3ee), var(--magenta, #ff3d9a));
}
.quiz-statement {
  min-height: 96px; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 18px; font-weight: 800; line-height: 1.55;
  padding: 12px 8px 16px;
}
.quiz-ox-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quiz-ox {
  font-size: 46px; line-height: 1; cursor: pointer; font-family: inherit;
  padding: 18px 0; border-radius: 18px; border: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.04); transition: transform 0.08s, box-shadow 0.12s, border-color 0.12s;
}
.quiz-maru { border-color: rgba(52, 211, 153, 0.5); }
.quiz-batsu { border-color: rgba(255, 90, 120, 0.5); }
.quiz-maru:active { transform: scale(0.95); box-shadow: 0 0 22px rgba(52, 211, 153, 0.45); }
.quiz-batsu:active { transform: scale(0.95); box-shadow: 0 0 22px rgba(255, 90, 120, 0.45); }
.quiz-ox.is-picked { box-shadow: 0 0 22px rgba(99, 102, 241, 0.5); border-color: var(--cyan); }
.quiz-ox:disabled { opacity: 0.85; cursor: default; }
.quiz-hint { text-align: center; font-size: 11.5px; color: var(--text-dim); font-weight: 700; margin-top: 12px; }

/* フィードバック */
.quiz-feedback {
  margin-top: 14px; padding: 12px 14px; border-radius: 14px; text-align: center;
  border: 1px solid var(--border); animation: quizFb 0.18s ease;
}
@keyframes quizFb { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.quiz-feedback.is-correct { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.55); }
.quiz-feedback.is-wrong { background: rgba(255, 90, 120, 0.13); border-color: rgba(255, 90, 120, 0.5); }
.quiz-fb-head { font-size: 16px; font-weight: 900; }
.quiz-fb-ans { font-size: 13px; font-weight: 800; margin-top: 4px; color: #e6edff; }
.quiz-fb-exp { font-size: 12px; color: var(--text-dim); font-weight: 600; margin-top: 5px; line-height: 1.5; }

/* ホームの入口タイル(マイシティ/都市制圧と同方式: 背景画像を::beforeで全面に敷く) */
.home-tile.tile-quiz {
  background: linear-gradient(160deg, rgba(255, 193, 77, 0.16), rgba(15, 20, 42, 0.94));
  border-color: rgba(255, 193, 77, 0.45);
  box-shadow: 0 0 16px rgba(255, 193, 77, 0.12);
}
/* .home-tile::before(opacity .55 / z-index 0)・.tile-icon{display:none} は predictions.css 側で共通定義 */
.tile-quiz::before {
  background: linear-gradient(0deg, #1a1206 0%, transparent 75%), url('/assets/img/quiz-arena.png') center/cover;
}
.tile-quiz .tile-go { color: var(--yellow, #ffc14d); }

/* 今日の挑戦状況バッジ(右上) */
.tile-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 10px; font-weight: 900; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(52, 211, 153, 0.95); color: #04221a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.tile-badge-ongoing { background: rgba(255, 193, 77, 0.96); color: #2a1c00; }

/* 挑戦済み: 画像をトーンダウンし、消化済みと分かるように */
.tile-quiz.is-done::before { opacity: 0.28; filter: grayscale(0.45); }
.tile-quiz.is-done .tile-name { color: #aeb9d6; }
.tile-quiz.is-done .tile-go { color: var(--green, #34d399); }

/* 結果 */
.quiz-score { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.quiz-score b { font-size: 30px; color: var(--cyan, #22d3ee); }
.quiz-result-reward { font-size: 14px; font-weight: 800; margin-bottom: 14px; }
.quiz-result-coin { font-size: 26px; color: var(--yellow, #ffc14d); text-shadow: 0 0 14px rgba(255, 193, 77, 0.5); }
