/* ===== 全体・リセット設定 ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #fcf9f2;
  color: #2b2b2b;
  line-height: 1.6;
}

.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ===== ヘッダー ===== */
header {
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url(images/20_439_0_img.jpeg);
  background-size: cover;
  background-position: center;
  padding: 80px 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 30px;
}

h1 {
  color: #ffffff;
  font-size: clamp(36px, 8vw, 72px);
  font-family: 'Lobster', 'Noto Sans JP', cursive;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  letter-spacing: 2px;
}

/* ===== 各セクション共通 ===== */
section {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 32px 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

h2 {
  color: #800000;
  font-size: clamp(22px, 4vw, 28px);
  border-left: 6px solid #800000;
  padding-left: 12px;
  margin-bottom: 24px;
  font-weight: 700;
}

/* ===== 生徒会紹介 ===== */
.info-card { font-size: 16px; }
.lead-text { font-size: 18px; font-weight: bold; color: #4a1515; margin-bottom: 20px; }
.member-box, .welcome-box { background-color: #fff8e7; border-radius: 12px; padding: 20px; margin-bottom: 20px; border: 1px solid #f3e0b5; }
.member-box h3, .welcome-box h3 { color: #800000; font-size: 18px; margin-bottom: 12px; }
.member-box ul, .welcome-box ul { list-style-type: none; padding-left: 0; }
.member-box li, .welcome-box li { margin-bottom: 8px; padding-left: 20px; position: relative; }
.member-box li::before { content: "✔"; color: #800000; position: absolute; left: 0; font-weight: bold; }
.welcome-box li::before { content: "★"; color: #e67e22; position: absolute; left: 0; }
.member-box span { font-weight: bold; color: #800000; }
.welcome-footer { margin-top: 12px; font-weight: bold; color: #d32f2f; }

/* ===== 診断機能 ===== */
.check-container { background-color: #ffffff; }
.question-box { background-color: #fff5e6; border-radius: 12px 12px 0 0; padding: 24px; border: 2px solid #ffe0b2; }
.question-item { display: flex; flex-direction: column; margin-bottom: 20px; }
@media (min-width: 600px) { .question-item { flex-direction: row; justify-content: space-between; align-items: center; } }
.question-text { font-size: 16px; font-weight: bold; color: #333333; margin-bottom: 8px; }
@media (min-width: 600px) { .question-text { margin-bottom: 0; } }
.answer-input { padding: 10px 14px; border-radius: 8px; border: 2px solid #ccc; font-size: 15px; background-color: #ffffff; outline: none; transition: border-color 0.2s; }
.answer-input:focus { border-color: #800000; }
.check-button-container { text-align: center; margin-top: 24px; }
.check-button { background-color: #800000; color: #ffffff; font-size: 18px; font-weight: bold; padding: 12px 48px; border-radius: 30px; border: none; box-shadow: 0 4px 10px rgba(128, 0, 0, 0.3); transition: all 0.2s; }
.check-button:hover { background-color: #a00000; cursor: pointer; transform: translateY(-2px); }
.check-result-box { background-color: #800000; color: #ffffff; border-radius: 0 0 12px 12px; padding: 28px 20px; text-align: center; }
.result-title { font-size: 16px; opacity: 0.9; margin-bottom: 8px; }
.check-result { color: #ffeb3b; font-size: clamp(24px, 5vw, 36px); font-weight: bold; }

/* ===== コメント・立候補届機能 ===== */
form { background-color: #fff8e7; border-radius: 12px; padding: 24px; margin-bottom: 32px; border: 1px solid #f3e0b5; }
.comment-title { color: #800000; font-size: 18px; margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; margin-bottom: 16px; }
.label-wrapper { font-weight: bold; color: #800000; font-size: 14px; margin-bottom: 6px; }
.name-input, .comment-input { width: 100%; padding: 10px 14px; font-size: 15px; background-color: #ffffff; border: 1px solid #cccccc; border-radius: 8px; outline: none; transition: border-color 0.2s; }
.name-input:focus, .comment-input:focus { border-color: #800000; }
.comment-input { height: 90px; resize: vertical; }
.submit-button { width: 100%; background-color: #800000; color: #ffffff; font-size: 16px; font-weight: bold; padding: 12px; border-radius: 8px; border: none; transition: background-color 0.2s; }
.submit-button:hover { background-color: #a00000; cursor: pointer; }

/* 投稿カード */
.comment-set {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.name-datetime-box { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; margin-bottom: 12px; }
.name { font-weight: bold; color: #800000; font-size: 16px; }
.datetime { color: #888888; font-size: 12px; }
.comment-text { color: #333333; font-size: 15px; white-space: pre-wrap; font-family: inherit; margin-bottom: 12px; }

/* スタンプ */
.stamp-container { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.card-stamp-btn { background-color: #fff8e7; color: #800000; border: 1px solid #f3e0b5; padding: 6px 12px; border-radius: 16px; font-size: 13px; font-weight: bold; transition: all 0.2s; }
.card-stamp-btn:hover { background-color: #800000; color: #ffffff; cursor: pointer; }

/* アクションバー */
.card-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #f0f0f0;
}

.reply-toggle-btn {
  background-color: #f0f4f8;
  color: #2c3e50;
  border: 1px solid #dcdfe6;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.reply-toggle-btn:hover {
  background-color: #e2e8f0;
}

/* いいねボタン（通常時） */
.like-button {
  display: flex;
  align-items: center;
  background-color: #fff0f0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ffccd5;
  cursor: pointer;
  transition: all 0.2s;
}

.like-button:hover {
  background-color: #ffe0e5;
  transform: scale(1.05);
}

.like-img {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  transition: filter 0.2s;
}

.like-count {
  font-size: 14px;
  font-weight: bold;
  color: #d32f2f;
  transition: color 0.2s;
}

/* いいね済み（赤色ハイライト・取り消し可能な状態） */
.like-button.liked {
  background-color: #d32f2f;
  border-color: #b71c1c;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.3);
}

.like-button.liked .like-count {
  color: #ffffff;
}

.like-button.liked .like-img {
  filter: brightness(0) invert(1);
}

/* ===== 返信リスト（吹き出しデザイン） ===== */
.replies-list {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 3px solid #f3e0b5;
}

.reply-card {
  background-color: #fbf9f5;
  border: 1px solid #eee5d8;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 14px;
}

.reply-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.reply-author {
  font-weight: bold;
  color: #800000;
}

.reply-time {
  font-size: 11px;
  color: #999999;
}

.reply-text {
  color: #444444;
  white-space: pre-wrap;
}

/* ===== 返信入力フォーム ===== */
.reply-form-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e0e0e0;
}

.reply-form-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply-input {
  width: 100%;
  height: 60px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}

.reply-input:focus {
  border-color: #800000;
}

.reply-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-counter {
  font-size: 12px;
  color: #666666;
}

.char-counter.over-limit {
  color: #d32f2f;
  font-weight: bold;
}

.send-reply-btn {
  background-color: #800000;
  color: #ffffff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.send-reply-btn:hover {
  background-color: #a00000;
}

.send-reply-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* ===== フッター ===== */
footer {
  text-align: center;
  background-color: #800000;
  color: #ffffff;
  padding: 20px;
  font-size: 14px;
  margin-top: 40px;
}