/* ===== 基本設定 ===== */
:root {
  --primary: #0d6efd;
  --success: #198754;
  --danger: #dc3545;
}

body {
  background-color: #f5f6fa;
  font-family: 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
  font-size: 15px;
}

/* ===== デモバナー ===== */
.demo-banner {
  background: #fff3cd;
  border-bottom: 1px solid #ffc107;
  font-size: 0.8rem;
}

/* ===== ナビゲーション ===== */
.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: -0.3px;
}

/* ===== カード ===== */
.card-hover {
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10) !important;
}

/* ===== 選択肢ラベル（スマホ最適化済み） ===== */
.choice-label {
  cursor: pointer;
  transition: background-color 0.1s, border-color 0.1s;
  user-select: none;
  display: block;
  line-height: 1.5;
  /* タップ領域を広く */
  min-height: 48px;
  display: flex;
  align-items: center;
}
.choice-label:hover,
.choice-label:active {
  background-color: #e8f0fe;
  border-color: var(--primary) !important;
}
.choice-label.selected {
  background-color: #cfe2ff;
  border-color: var(--primary) !important;
  font-weight: 600;
}
.choice-label input[type="radio"] {
  flex-shrink: 0;
  pointer-events: none;
  width: 18px;
  height: 18px;
}

/* ===== タイマー点滅 ===== */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.timer-warning {
  animation: blink 1s infinite;
}

/* ===== プログレスバー ===== */
.progress { border-radius: 99px; }

/* ===== スマホ向けレスポンシブ ===== */
@media (max-width: 575px) {
  body { font-size: 14px; }

  .navbar-brand { font-size: 1rem; }

  /* カード内パディング縮小 */
  .card-body { padding: 0.85rem; }

  /* 選択肢のフォントを読みやすく */
  .choice-label { font-size: 0.9rem; min-height: 52px; }

  /* ボタンを全幅に */
  .btn-submit-full { width: 100%; }

  /* テーブルの文字を小さく */
  .table { font-size: 0.82rem; }

  /* 表示しないカラム */
  .d-sm-none { display: none !important; }

  /* display-4 を小さく */
  .display-4 { font-size: 2rem; }

  h2.h4 { font-size: 1.1rem; }
}

/* ===== タブレット向け ===== */
@media (max-width: 767px) {
  .container-md { padding-left: 12px; padding-right: 12px; }
}

/* ===== アクセシビリティ: フォーカスリング ===== */
:focus-visible {
  outline: 3px solid #0d6efd80;
  outline-offset: 2px;
}
