* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  color: #1c1e21;
}

/* ヘッダー */
.header {
  background: #e10600;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px;
}
.logo {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* フィード */
.feed {
  max-width: 680px;
  margin: 16px auto;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 記事カード */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 8px;
}
.original-link {
  font-size: 11px;
  color: #999;
  text-decoration: none;
}
.original-link:hover { text-decoration: underline; }

.source-badge {
  background: #e10600;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.card-time {
  color: #65676b;
  font-size: 13px;
}

.card-body {
  padding: 0 16px 12px;
}
.card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}
.card-title a {
  color: #1c1e21;
  text-decoration: none;
}
.card-title a:hover { text-decoration: underline; }
.card-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

/* コメントエリア */
.comments-section {
  border-top: 1px solid #e4e6ea;
  padding: 8px 16px 12px;
  background: #f8f8f8;
}
.comments-label {
  font-size: 12px;
  color: #65676b;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.comment {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.comment:last-child { margin-bottom: 0; }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.comment-bubble {
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  flex: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.comment-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.comment-text {
  font-size: 14px;
  line-height: 1.5;
  color: #1c1e21;
}
.comment-time {
  font-size: 11px;
  color: #aaa;
  margin-top: 3px;
}

/* もっと見る */
.load-more-wrap {
  text-align: center;
  padding: 16px;
}
.load-more-btn {
  background: #e10600;
  color: #fff;
  border: none;
  padding: 10px 32px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.load-more-btn:hover { background: #c10000; }

.loading {
  text-align: center;
  color: #65676b;
  padding: 32px;
}
.no-comments {
  color: #aaa;
  font-size: 13px;
  font-style: italic;
  padding: 4px 0;
}

/* ヘッダー ログイン */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.login-btn {
  background: #06c755;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.login-btn:hover { background: #05b04a; }
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.user-avatar-initial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff3;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.user-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.logout-btn {
  color: #ffcccc;
  font-size: 12px;
  text-decoration: none;
}
.logout-btn:hover { text-decoration: underline; }

/* ユーザーコメント */
.user-comments-divider {
  border-top: 1px dashed #ddd;
  margin: 8px 0;
}
.avatar-user {
  background: #06c755;
  overflow: hidden;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* コメント投稿フォーム */
.comment-form {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.comment-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
}
.comment-input:focus {
  outline: none;
  border-color: #e10600;
}
.comment-submit {
  background: #e10600;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.comment-submit:hover { background: #c10000; }
.comment-submit:disabled { opacity: 0.5; cursor: default; }
.comment-login-prompt {
  margin-top: 10px;
  text-align: center;
}
.login-btn-small {
  color: #06c755;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.login-btn-small:hover { text-decoration: underline; }

/* AI返信待ち */
.ai-reply-pending {
  font-size: 13px;
  color: #aaa;
  padding: 6px 0 4px 40px;
  font-style: italic;
}
