/* 知識共有SNS（試作） 共通スタイル
   伝言板（dengonban.html）の雰囲気を引き継ぐ：BIZ UDPGothic、背景 #f4f6f9、
   メインカラー #1a56db、白いカード、スマホ優先、container 最大640px */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #f4f6f9;
  color: #222;
  font-family: 'BIZ UDPGothic', sans-serif;
  min-height: 100vh;
  padding: 24px 14px 60px;
  display: flex; flex-direction: column; align-items: center;
}
.container { width: 100%; max-width: 640px; }
header { text-align: center; margin-bottom: 22px; }
h1 {
  font-size: clamp(20px, 5vw, 26px); font-weight: 700;
  color: #1a56db; margin-bottom: 4px; letter-spacing: 0.03em;
}
h1 a { color: #1a56db; text-decoration: none; }
.subtitle { font-size: 11px; color: #666; line-height: 1.8; }

/* ヘッダーのログイン状態エリア */
.header-auth {
  margin-top: 14px; font-size: 13px; line-height: 1.8; color: #333;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
}
.header-auth .nickname { font-weight: 700; }
.header-auth .login-msg { width: 100%; font-size: 12px; color: #c0392b; }

/* カード */
.card {
  background: #fff; border: 1px solid #dde3ee; border-radius: 10px;
  padding: 18px; margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.card h2 { font-size: 16px; color: #1a56db; margin: 0 0 10px; }
.card p { font-size: 14px; line-height: 1.8; margin: 0 0 10px; }
.card a { color: #1a56db; }

/* ボタン */
.btn {
  display: inline-block; border: none; border-radius: 8px; cursor: pointer;
  background: #1a56db; color: #fff; font-family: 'BIZ UDPGothic', sans-serif;
  font-size: 14px; font-weight: 700; padding: 10px 18px;
  text-decoration: none; text-align: center; line-height: 1.4;
}
.btn:hover { background: #1649b8; }
.btn:disabled { background: #9db8ec; cursor: wait; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn-secondary {
  background: #fff; color: #1a56db; border: 1px solid #1a56db;
}
.btn-secondary:hover { background: #eef3fe; }
.btn-small { font-size: 12px; padding: 6px 12px; }
.btn-link {
  background: none; border: none; cursor: pointer; padding: 6px 4px;
  color: #1a56db; font-family: 'BIZ UDPGothic', sans-serif;
  font-size: 13px; text-decoration: underline;
}

/* 入力欄 */
.field label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 5px; }
.field input[type="text"], .field input[type="url"], .field textarea, .field select {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 6px;
  font-family: 'BIZ UDPGothic', sans-serif; font-size: 14px; color: #222;
  padding: 9px 10px; margin-bottom: 12px; outline: none; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: #1a56db; }
.field textarea { min-height: 200px; resize: vertical; line-height: 1.7; }
.field .hint { font-size: 11px; color: #888; margin: -6px 0 12px; line-height: 1.6; }
.field .count { font-size: 11px; color: #888; margin: -6px 0 12px; text-align: right; }

/* メッセージ */
.msg { font-size: 13px; margin-top: 10px; line-height: 1.6; }
.msg.error { color: #c0392b; }
.msg.ok { color: #1a7a3a; }
.msg:empty { display: none; }

/* 検索・カテゴリー */
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input[type="text"] {
  flex: 1; border: 1px solid #cbd5e1; border-radius: 6px;
  font-family: 'BIZ UDPGothic', sans-serif; font-size: 14px; color: #222;
  padding: 9px 10px; outline: none; background: #fff; min-width: 0;
}
.search-row input[type="text"]:focus { border-color: #1a56db; }
.chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.chip {
  border: 1px solid #cbd5e1; border-radius: 999px; cursor: pointer;
  background: #fff; color: #333; font-family: 'BIZ UDPGothic', sans-serif;
  font-size: 12px; padding: 6px 12px;
}
.chip:hover { border-color: #1a56db; color: #1a56db; }
.chip.active { background: #1a56db; border-color: #1a56db; color: #fff; font-weight: 700; }

/* 投稿一覧 */
.list-title { font-size: 15px; font-weight: 700; color: #1a56db; margin: 6px 0 10px; }
.post-card {
  background: #fff; border: 1px solid #dde3ee; border-radius: 10px;
  padding: 16px 18px; margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.post-card .post-theme { font-size: 12px; color: #666; margin-bottom: 4px; }
.post-card h2 { font-size: 16px; line-height: 1.6; margin: 0 0 6px; }
.post-card h2 a { color: #1a56db; text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }
.post-card .post-excerpt {
  font-size: 14px; line-height: 1.8; color: #333; margin-bottom: 10px;
  white-space: pre-wrap; word-break: break-word;
}
.post-meta {
  font-size: 12px; color: #888; display: flex; flex-wrap: wrap; gap: 4px 12px;
  align-items: center;
}
.post-meta .nickname { color: #555; font-weight: 700; }

/* バッジ（小さな灰色） */
.badge {
  display: inline-block; font-size: 11px; color: #555;
  background: #eef1f6; border: 1px solid #dde3ee; border-radius: 4px;
  padding: 2px 7px; line-height: 1.6; white-space: nowrap;
}
.badge-cat { color: #1a56db; background: #eef3fe; border-color: #c8d8f8; }

/* AIチェックの小さな表示 */
.ai-note { font-size: 11px; color: #888; }
.ai-note.warn { color: #b7791f; }

/* 詳細ページ */
.post-detail .post-theme { font-size: 13px; color: #666; margin-bottom: 4px; }
.post-detail h2 { font-size: 19px; line-height: 1.6; margin: 0 0 10px; color: #222; }
.post-detail .post-body {
  font-size: 14px; line-height: 1.9; color: #222;
  white-space: pre-wrap; word-break: break-word; margin: 14px 0;
}
.post-detail .source { font-size: 13px; line-height: 1.8; margin: 10px 0; word-break: break-all; }
.post-detail .source a { color: #1a56db; }
.back-link { font-size: 13px; margin-top: 6px; }
.back-link a { color: #1a56db; }

/* 状態表示・空表示 */
.status-box {
  background: #fff; border: 1px solid #dde3ee; border-radius: 10px;
  padding: 18px; font-size: 13px; line-height: 1.8; color: #555; text-align: center;
  margin-bottom: 12px;
}
.load-more-wrap { text-align: center; margin: 8px 0 18px; }

footer { text-align: center; font-size: 11px; color: #999; margin-top: 8px; }
footer a { color: #999; }
