/* =====================================================================
   style.css — 世界の国・首都・国旗クイズ ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる。
   色は正規のCSS変数（--sg-*）＋フォールバックでダーク対応。
   ===================================================================== */

/* 汎用の余白（共有CSSに無い段階のフォールバック） */
.sg-mt-3 { margin-top: var(--sg-space-3, 12px); }

/* モード選択 */
.sg-modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--sg-space-1, 4px);
}
.sg-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 国旗絵文字に関する注記 */
.wcq-note {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--sg-muted, #666);
}

/* ゴーストボタン（共有CSSに変種が無い場合の控えめボタン） */
.sg-btn--ghost {
  background: transparent;
  color: var(--sg-primary, #3b5bdb);
  border: 1px solid var(--sg-border, #d7dbe6);
}

/* ステータスバー */
.wcq-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: var(--sg-space-3, 12px);
  font-size: 0.9rem;
  color: var(--sg-muted, #666);
}
.wcq-status__item {
  background: var(--sg-surface-2, #f1f3f9);
  border: 1px solid var(--sg-border, #e2e6ee);
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}

/* 国旗当てモードの大きな国旗表示 */
.wcq-flag {
  font-size: 5rem;
  line-height: 1.1;
  text-align: center;
  margin: 6px 0 4px;
  /* 絵文字フォントを優先（環境によりテキスト表示になる旨はUIで注記） */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
@media (max-width: 480px) {
  .wcq-flag { font-size: 4rem; }
}

/* 出題文 */
.wcq-prompt {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 6px 0 var(--sg-space-3, 14px);
  color: var(--sg-fg, #1a1f2b);
}

/* 選択肢ボタン（2列グリッド、モバイルは1列） */
.wcq-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .wcq-choices { grid-template-columns: 1fr; }
}
.wcq-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font-size: 1.05rem;
  border: 1px solid var(--sg-border, #d7dbe6);
  border-radius: 12px;
  background: var(--sg-surface, #fff);
  color: var(--sg-fg, #1a1f2b);
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .05s;
}
.wcq-choice:hover:not(:disabled) {
  border-color: var(--sg-primary, #3b5bdb);
  background: var(--sg-primary-soft, #eef2ff);
}
.wcq-choice:active:not(:disabled) { transform: scale(0.99); }
.wcq-choice:disabled { cursor: default; opacity: 1; }
.wcq-choice__num {
  flex: 0 0 1.6em;
  height: 1.6em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sg-muted, #777);
  background: var(--sg-surface-2, #f1f3f9);
  border-radius: 8px;
}
.wcq-choice__label { flex: 1 1 auto; }

/* 正誤の色分け（回答後） */
.wcq-choice.is-correct {
  border-color: #2f9e44;
  background: rgba(47, 158, 68, 0.12);
}
.wcq-choice.is-correct .wcq-choice__num { color: #2f9e44; }
.wcq-choice.is-wrong {
  border-color: #e03131;
  background: rgba(224, 49, 49, 0.12);
}
.wcq-choice.is-wrong .wcq-choice__num { color: #e03131; }

/* フィードバック */
.wcq-feedback {
  min-height: 1.6em;
  margin: var(--sg-space-3, 14px) 0 0;
  font-weight: 600;
  line-height: 1.6;
}
.wcq-feedback.is-correct { color: #2f9e44; }
.wcq-feedback.is-wrong { color: #e03131; }

/* アクション行 */
.wcq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--sg-space-3, 14px);
}

/* 結果 */
.wcq-final {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--sg-fg, #1a1f2b);
}
.wcq-best {
  font-weight: 600;
  color: var(--sg-primary, #3b5bdb);
  margin: 4px 0 0;
}
.wcq-perfect {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2f9e44;
  margin: var(--sg-space-3, 14px) 0 0;
}
.wcq-review { margin-top: var(--sg-space-3, 14px); }
.wcq-review__head {
  font-weight: 700;
  margin: 0 0 6px;
}
.wcq-review-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sg-border, #e2e6ee);
}
.wcq-review-row__subject { font-weight: 600; }
.wcq-review-row__answer {
  font-size: 0.9rem;
  color: var(--sg-muted, #666);
}
