/* テーマ既定の float レイアウトを無効化 */
.content__single .blog-layout main,
.content__single .blog-layout .sidebar {
  float: none !important;
  width: auto !important;
  margin-left: 10px;
  margin-right: 10px;
}

/* モバイル表示（1カラム時） */
@media (max-width: 1024px) {
  .content__single .blog-layout main,
  .content__single .blog-layout .sidebar {
    margin: 24px 40px; /* 少し内側に詰める */
  }
}

/* 2カラム */
.content__single .blog-layout {
  display: grid !important;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1024px) {
  .content__single .blog-layout {   
    grid-template-columns: 1fr;
  }
  .content__single .sidebar {
    order: 2;   
  }
}

/* 画像・本文をカラム幅にフィット */
.content__single .entry-img,
.content__single .entry__body {
  max-width: 100%;
}

.content__single .entry-img img,
.content__single .entry__body img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 本文下：カテゴリ / タグ */
.post-taxonomy {
  margin: 24px 0 32px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.post-taxonomy .tax-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  border: 1px solid #f28c1d;
  background: #f28c1d;
  color: #fff;
}

.pill:hover {
  background: #f28c1d;
  color: #fff;
}

.pill-tag {
  border-color: #f28c1d;
  color: #f28c1d;
  background: #fff;
}

.pill-tag:hover {
  background: #f28c1d;
  color: #fff;
}

/* サイドバー*/
.sidebar .sidebar-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 12px;
}

.sidebar .sidebar-card.no-frame {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  margin: 0 0 16px;
}

.sidebar .sidebar-card.no-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.sidebar .sidebar-card h3 {
    display: inline-block;
    font-size: 14px;
    margin: 0 0 12px;
    font-weight: 700;
    padding-bottom: 2px;
    border-bottom: 1px solid #999999;
    color: #333;
}

/* TAG */
#sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#sidebar-tags a {
  display:inline-block;
  padding:4px 8px;
  border:none;
  background:none;
  color:#333333;
  text-decoration:none;
  font-size:12px;
  line-height:1;
  font-weight:600; 
}

#sidebar-tags a:hover {
  border-color:#f28c1d;
  color:#f28c1d;
}

/* NEW BLOG */
#sidebar-latest .latest-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin: 0 0 12px;
}

#sidebar-latest .latest-thumb {
  width: 80px;
  aspect-ratio: 16/10;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f3f3;
}

#sidebar-latest .latest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#sidebar-latest .latest-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 2px;
    color: #333333;
}

#sidebar-latest .latest-date {
  font-size: 12px;
  color: #666;
}

/* 前後ナビ（前の記事 / 次の記事） */
#next_prev_post {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 1px solid #ddd;
  margin-top: 40px;
  padding-top: 20px;
  gap: 0;
}

#next_prev_post a {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  line-height: 1.4;
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

/* 左右 */
#next_prev_post a.prev-link {
  align-items: flex-start;
  padding: 0 20px 0 40px;
  border-right: 1px solid #ddd;
}

#next_prev_post a.next-link {
  align-items: flex-end;
  padding: 0 40px 0 20px; 
}

/* ラベル / タイトル */
#next_prev_post a .nav-label {
  display: block;
  font-size: 1.5rem;
  color: #999;
  margin-bottom: 6px;
  font-weight: 600;
}

#next_prev_post a .nav-title {
  display: block;
  font-size: 1.1em;
  font-weight: 600;
}

/* 矢印 */
#next_prev_post a.prev-link::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-10%) rotate(-45deg);
  width: 12px;
  height: 12px;
  border-top: 1px solid #333;
  border-left: 1px solid #333;
}

#next_prev_post a.next-link::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-10%) rotate(45deg);
  width: 12px;
  height: 12px;
  border-top: 1px solid #333;
  border-right: 1px solid #333;
}

@media (max-width: 749px) {
  #next_prev_post a .nav-title {
    font-size: 1rem;
  }
}

/* サイドバー上部の余白 */
.sidebar {
  margin-top: 96px; 
}