/* ================================================================
   Sample Superstore — fun.css
   about.html 追加セクション（トリビア・クイズ・記録）と ir.html 用のスタイル
   site.css の変数（--brand 等）を利用する。
   ================================================================ */

/* ---------------- トリビア ---------------- */
.trivia-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trivia-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; text-align: center; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
}
.trivia-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tv-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.tv-num { font-size: 34px; font-weight: 900; color: var(--brand-dark); margin-top: 6px; font-variant-numeric: tabular-nums; }
.tv-sub { font-size: 12px; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.tv-note { font-size: 11.5px; color: var(--ink-soft); margin-top: 16px; text-align: center; }

/* ---------------- クイズ ---------------- */
.quiz-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.quiz-q { font-weight: 800; font-size: 16px; margin-bottom: 14px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  padding: 12px 16px; font-size: 14px; font-weight: 700; text-align: left;
  color: var(--ink); transition: .18s;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.correct { background: var(--brand); border-color: var(--brand); color: #fff; }
.quiz-opt.wrong { background: var(--danger); border-color: var(--danger); color: #fff; }
/* 回答後の正誤フィードバック */
.quiz-opt-mark { font-size: 12px; font-weight: 800; white-space: nowrap; opacity: .95; }
.quiz-verdict { font-size: 15px; font-weight: 800; margin-bottom: 10px; letter-spacing: .02em; }
.quiz-verdict:empty { display: none; margin: 0; }
.quiz-verdict.ok { color: var(--brand-dark); }
.quiz-verdict.ng { color: var(--danger); }
.quiz-expl {
  display: none; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line);
  font-size: 13.5px; line-height: 1.8; color: var(--ink-soft);
}
.quiz-expl.open { display: block; }
.quiz-expl b { color: var(--brand-dark); }
.quiz-chart { height: 180px; position: relative; margin-top: 12px; }
.quiz-score {
  background: linear-gradient(120deg, #111c2e 0%, #1e3a5f 60%, #0e7c66 130%); color: #fff;
  border-radius: 16px; padding: 26px 30px; text-align: center; font-size: 18px; font-weight: 800;
  margin-top: 8px;
}
.quiz-score b { color: #fde68a; font-size: 21px; }

/* ---------------- 記録ずくめコーナー ---------------- */
.record-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.record-grid.mini { grid-template-columns: repeat(2, 1fr); }
.record-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; text-align: center; transition: .25s;
}
.record-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.rc-icon { font-size: 28px; }
.rc-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-top: 6px; }
.rc-val { font-size: 20px; font-weight: 900; margin-top: 4px; line-height: 1.35; word-break: break-word; }
.rc-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; }

/* ---------------- リピーターカード ---------------- */
.loyalty-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; transition: .2s;
}
.loyalty-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.loyalty-card .name { font-weight: 800; font-size: 14px; }
.loyalty-card .cnt { font-size: 12.5px; color: var(--ink-soft); }

/* ---------------- IR: ヒーロー ---------------- */
.ir-hero-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 38px; position: relative; }
.ir-hero-price { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ir-up { color: #4ade80; }
.ir-down { color: #fca5a5; }

/* ---------------- IR: ニューステーブル ---------------- */
.news-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.news-table th { text-align: left; color: var(--ink-soft); font-weight: 600; font-size: 12px; border-bottom: 2px solid var(--line); padding: 10px 8px; }
.news-table td { border-bottom: 1px solid var(--line); padding: 12px 8px; vertical-align: middle; }
.news-table tbody tr { transition: .15s; }
.news-table tbody tr:hover { background: var(--bg-soft); }
.news-table .date { color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.news-table a { color: var(--brand-dark); font-weight: 700; }
.news-table a:hover { text-decoration: underline; }
.ir-tag {
  display: inline-block; font-size: 11px; font-weight: 800; border-radius: 6px;
  padding: 3px 10px; background: var(--brand-light); color: var(--brand-dark); white-space: nowrap;
}

/* ---------------- IR: FAQ ---------------- */
.faq details {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; background: #fff;
}
.faq summary { font-weight: 800; font-size: 14.5px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "▶"; display: inline-block; font-size: 10px; margin-right: 10px; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq details p { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }

/* ---------------- 集計定義の注記（クイズ・ダッシュボード共通） ---------------- */
.fun-def { font-size: 11px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }

/* ---------------- Q7: 希少性ワッフル図 ---------------- */
.fun-waffle-wrap { text-align: center; margin: 14px 0 6px; }
.fun-waffle-wrap canvas { max-width: 100%; }
.fun-waffle-legend { display: flex; justify-content: center; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.fun-waffle-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ---------------- Q7: 最下位商品ミニカード ---------------- */
.fun-worst-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.fun-worst-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  text-align: center; text-decoration: none; color: var(--ink); transition: .2s; display: block;
}
.fun-worst-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); }
.fun-worst-card img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; background: var(--bg-soft); display: block; }
.fun-worst-card .n {
  font-size: 11px; font-weight: 700; margin-top: 6px; line-height: 1.4; height: 2.8em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fun-worst-card .p { font-size: 12px; font-weight: 800; color: #c62a2f; margin-top: 4px; }

/* ---------------- Q7: 締めのコピー ---------------- */
.fun-outro { font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); background: var(--bg-soft); border-radius: 12px; padding: 16px 18px; margin-top: 16px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .trivia-grid { grid-template-columns: repeat(2, 1fr); }
  .record-grid { grid-template-columns: repeat(2, 1fr); }
  .ir-hero-kpis { grid-template-columns: repeat(2, 1fr); }
  .fun-worst-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .trivia-grid { grid-template-columns: 1fr; }
  .record-grid { grid-template-columns: 1fr; }
  .ir-hero-kpis { grid-template-columns: 1fr; }
  .fun-worst-grid { grid-template-columns: repeat(2, 1fr); }
}
