/* === 全体の共通設定 === */
body {
  font-family: 'Helvetica Neue', sans-serif;
  padding: 20px;
  margin: 0;
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

/* === リンク === */
a {
  color: #007aff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

header {
	max-width:600px;
	margin:auto;
	background: url(https://japangram.jp/assets/images/mv.jpg);
    background-repeat: no-repeat;
    background-size: cover;
	background-position-x: center;
}

h3 {
	text-align:center;
}
/* === フォーム === */
form input,
form textarea,
form select,
form button {
  width: 100%;
  max-width: 600px;
  margin-bottom: 10px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
}

/* === カテゴリボタン === */
ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
ul li a {
  display: inline-block;
  padding: 6px 14px;
  background: #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
  color: #333;
  transition: background 0.2s;
}
ul li a:hover {
  background: #ccc;
}

/* === 投稿カード全体 === */
.post-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px;
  margin: 20px auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  max-width: 600px;
}

/* === 投稿ヘッダー（アイコン＋名前）=== */
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* === 投稿タイトル === */
.post-title {
  font-size: 18px;
  font-weight: bold;
  margin: 10px 0;
}

/* === カテゴリ・日時・投稿者名などの小テキスト === */
.post-card small,
.post-card em {
  color: #888;
  font-size: 0.85em;
}

/* === Swiperスライダー === */
.swiper {
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  max-width: 100%;
}

/* === いいねボタン・アニメーション === */
.like-btn,
.comment-like-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #555;
  margin-top: 5px;
  transition: color 0.2s ease;
}
.like-btn.liked,
.comment-like-btn.liked {
  color: red;
}

.like-count {
  display: inline-block;
  transition: transform 0.2s ease;
}
.like-count.animate {
  animation: pop 0.2s ease-in-out;
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* === コメント欄 === */
.comment-section {
  max-width: 600px;
  margin: 30px auto;
}
.comment {
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.comment img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* ← 任意で調整： 1 / 1 でもOK */
  overflow: hidden;
  background: #eee;
  border-radius: 8px;
}

.post-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* ← ここ重要！coverで中央トリミング */
  object-position: center;
}
.comment-card {
	max-width:600px;
	margin:auto;
}

.tag {
  display: inline-block;
  background: #eee;
  border-radius: 12px;
  padding: 4px 10px;
  margin: 3px;
  font-size: 0.9em;
}
.tag-container {
  margin-top: 10px;
}

.tag {
  display: inline-block;
  background-color: #eee;
  color: #333;
  font-size: 0.85em;
  padding: 3px 6px;
  border-radius: 4px;
  margin: 0 4px 4px 0;
}
