/* 日本珍質問センター — ポップ路線。丸ゴシック＋吹き出し会話カード */

:root {
  --color-primary: #6741d9;
  --color-primary-soft: #ede7fd;
  --color-accent: #ffd43b;
  --color-bg: #faf8ff;
  --color-card: #ffffff;
  --color-bubble-q: #f1f3f5;
  --color-bubble-a: #e7e0fb;
  --color-text: #343038;
  --color-text-muted: #7a7580;
  --color-line: #e9e5f2;
  --shadow-card: 0 4px 16px rgba(103, 65, 217, 0.08);
  --z-header: 100;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #b197fc;
    --color-primary-soft: #2f2843;
    --color-accent: #ffd43b;
    --color-bg: #17151c;
    --color-card: #221f29;
    --color-bubble-q: #2c2933;
    --color-bubble-a: #322a4a;
    --color-text: #eae7ef;
    --color-text-muted: #9d97a8;
    --color-line: #322e3c;
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.site-header {
  background: linear-gradient(135deg, #6741d9 0%, #9775fa 100%);
  color: #fff;
  padding: 32px 0 28px;
}

.site-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.06em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-tagline {
  margin: 8px 0 0;
  font-size: 13.5px;
  opacity: 0.92;
}

/* セクション */
.section-heading {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 44px 0 16px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.house-filter select {
  font-family: inherit;
  font-size: 14px;
  padding: 6px 12px;
  border: 2px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-card);
  color: var(--color-text);
}

/* カード */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.item-card {
  background: var(--color-card);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 20px 22px 16px;
}

.item-meta {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.reply-chip {
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* 返事の種類ごとのチップ色 */
.chip-dodge { background: #fff3bf; color: #8a6d00; }   /* はぐらかし系 */
.chip-mute { background: #e9ecef; color: #5c636a; }    /* ノーコメント系 */
.chip-rebut { background: #ffe3e3; color: #b23a48; }   /* 反論・予定なし */
.chip-forward { background: #d3f9d8; color: #2b8a3e; } /* 検討・継続 */
.chip-answer { background: var(--color-primary-soft); color: var(--color-primary); }
.chip-wait { background: var(--color-bubble-q); color: var(--color-text-muted); }

@media (prefers-color-scheme: dark) {
  .chip-dodge { background: #4a3f12; color: #ffe066; }
  .chip-mute { background: #33363a; color: #adb5bd; }
  .chip-rebut { background: #4a2328; color: #ffa8a8; }
  .chip-forward { background: #1e3a24; color: #8ce99a; }
}

.item-name {
  margin: 2px 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}

/* 会話吹き出し */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.chat-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-row.gov { flex-direction: row-reverse; }

.chat-face {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #868e96;
}

.chat-row.gov .chat-face {
  background: var(--color-primary);
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.7;
}

.chat-row.giin .chat-bubble {
  background: var(--color-bubble-q);
  border-bottom-left-radius: 4px;
}

.chat-row.gov .chat-bubble {
  background: var(--color-bubble-a);
  border-bottom-right-radius: 4px;
}

.chat-name {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

/* 原文アコーディオン */
.item-source {
  margin: 12px 0 0;
  font-size: 13.5px;
}

.item-source summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 12.5px;
}

.item-source dl {
  margin: 8px 0 0;
  padding: 10px 14px;
  background: var(--color-bg);
  border-radius: 12px;
}

.item-source dt {
  font-weight: 700;
  font-size: 12px;
  color: var(--color-text-muted);
}

.item-source dd { margin: 2px 0 8px; }
.item-source dd:last-child { margin-bottom: 0; }

.item-actions {
  margin-top: 12px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.item-actions a {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.item-actions a:hover { text-decoration: underline; }

/* 空状態・フッター */
.empty-state {
  color: var(--color-text-muted);
  font-size: 14px;
}

.load-more-wrap {
  text-align: center;
  margin: 28px 0 0;
}

.load-more {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: 999px;
  padding: 10px 36px;
  cursor: pointer;
}

.load-more:hover { opacity: 0.9; }

.site-footer {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--color-line);
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.site-footer p { margin: 4px 0; }

.site-footer a { color: var(--color-primary); }

/* 補助 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* aboutページ */
.about-body h2 {
  font-size: 17px;
  margin: 36px 0 8px;
}

.about-body p { margin: 8px 0; }
