@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/* ============================================
   CSS変数
   ============================================ */
:root {
  --color-bg: #f9f9f9;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #6b7280;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-accent: #2563EB;
  --max-width: 1080px;
}

/* ============================================
   ヘッダー：トップメニューレイアウト幅修正
   ============================================ */
.header-container-in.hlt-top-menu {
  width: 100%;
}

ul.menu-top {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.menu-top .menu-item {
  margin: 0;
  padding: 0;
  border: none;
}

ul.menu-top .menu-item a {
  display: flex;
  align-items: center;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

ul.menu-top .menu-item a:hover,
ul.menu-top .menu-item.current-menu-item a {
  color: var(--color-text);
  background: var(--color-border-light);
}

ul.menu-top .caption-wrap {
  display: contents;
}

ul.menu-top .item-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

ul.menu-top .item-description {
  display: none;
}

/* ============================================
   フロントページ – Cocoon デフォルトレイアウト無効化
   ============================================ */
.home #content,
.home #content-in {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.home #main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.home #sidebar {
  display: none !important;
}

/* ============================================
   フロントページ 共通
   ============================================ */
.fp-body {
  background: var(--color-bg);
}

/* ============================================
   ヒーローエリア
   ============================================ */
.fp-hero {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.fp-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.fp-hero__grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ヒーロー記事 */
.fp-hero__link {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
}

.fp-hero__img-wrap {
  position: relative;
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
}

.fp-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.fp-hero__link:hover .fp-hero__img {
  transform: scale(1.05);
}

.fp-hero__img--fallback {
  width: 100%;
  height: 100%;
  background: var(--color-border);
}

.fp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
}

.fp-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
}

.fp-hero__category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 12px;
}

.fp-hero__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.4;
  margin: 0 0 8px;
}

.fp-hero__excerpt {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.6);
}

/* 注目の記事 */
.fp-featured {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fp-featured__heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.fp-featured__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fp-featured__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.fp-featured__item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: var(--color-border);
}

.fp-featured__img-wrap {
  width: 100px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.fp-featured__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fp-featured__img--fallback {
  width: 100%;
  height: 100%;
  background: var(--color-border);
}

.fp-featured__info {
  flex: 1;
  min-width: 0;
}

.fp-featured__cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-bottom: 4px;
}

.fp-featured__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-featured__meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--color-text-light);
}


/* ============================================
   メインエリア（最新記事 + サイドバー）
   ============================================ */
.fp-main {
  background: var(--color-bg);
  padding: 40px 0 60px;
}

.fp-main__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 32px;
  align-items: start;
}

.fp-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 20px;
}

/* 記事カードグリッド */
.fp-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.fp-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.fp-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.fp-card__img-link {
  display: block;
}

.fp-card__img-wrap {
  height: 180px;
  overflow: hidden;
}

.fp-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.fp-card:hover .fp-card__img {
  opacity: 0.95;
}

.fp-card__img--fallback {
  width: 100%;
  height: 100%;
  background: var(--color-border);
}

.fp-card__body {
  padding: 16px;
}

.fp-card__category {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-bottom: 6px;
}

.fp-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-card__title a {
  color: var(--color-text);
  text-decoration: none;
}

.fp-card__title a:hover {
  color: var(--color-accent);
}

.fp-card__excerpt {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.fp-card__author-name {
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  margin: 0;
}

.fp-card__date {
  font-size: 11px;
  color: var(--color-text-light);
  margin: 0;
}

.fp-card__more {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.fp-card__more:hover {
  color: var(--color-accent);
}

/* もっと読む */
.fp-more {
  margin-top: 28px;
  text-align: center;
}

.fp-more__btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-decoration: none;
  background: var(--color-white);
}

.fp-more__btn:hover {
  color: var(--color-accent);
  background: var(--color-border-light);
  border-color: #9ca3af;
}

/* ============================================
   サイドバー
   ============================================ */
.fp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fp-sidebar__widget {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.fp-sidebar__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
}

/* 検索フォーム */
.fp-sidebar__widget .search-form {
  display: flex;
  gap: 8px;
}

.fp-sidebar__widget .search-field {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  outline: none;
  background: var(--color-bg);
}

.fp-sidebar__widget .search-field:focus {
  border-color: var(--color-accent);
  background: var(--color-white);
}

.fp-sidebar__widget .search-submit {
  padding: 8px 14px;
  font-size: 13px;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.fp-sidebar__widget .search-submit:hover {
  opacity: 0.85;
}

.fp-sidebar__widget .search-box {
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  padding-right: 0;
}

.fp-sidebar__widget .search-edit {
  border: none;
  padding: 0 12px;
  height: 44px;
  flex: 1;
  outline: none;
  background: white;
}

.fp-sidebar__widget .search-submit {
  position: static;
  width: 48px;
  height: 44px;
  top: auto;
  right: auto;
  border-radius: 0;
  font-size: 18px;
  border-left: none;
  background: white;
  color: #6b7280;
}

/* カテゴリリスト */
.fp-sidebar__cats .cat-item {
  padding: 0 4px;
  border-radius: 6px;
  transition: background 0.15s;
}

.fp-sidebar__cats .cat-item:hover {
  background: #f3f4f6;
}

.fp-sidebar__cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* wp_list_categories は <a>カテゴリ名</a> (件数) という構造を出力するため
   <li> を flex にして <a> と件数テキストを横並びにする */
.fp-sidebar__cats li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 2px 0;
  border: none;
  font-size: 12px;
  color: var(--color-text-light);
}

.fp-sidebar__cats a {
  flex: 1;
  display: block;
  padding: 5px 8px 5px 0;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.fp-sidebar__cats a:hover {
  background: var(--color-border-light);
  color: var(--color-accent);
}

.fp-sidebar__cats .current-cat > a {
  color: var(--color-accent);
  font-weight: 600;
}

/* 最近の記事 */
.fp-sidebar__recent {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fp-sidebar__recent-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
}

.fp-sidebar__recent-img-wrap {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}

.fp-sidebar__recent-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fp-sidebar__recent-img--fallback {
  width: 100%;
  height: 100%;
  background: var(--color-border);
}

.fp-sidebar__recent-info {
  flex: 1;
  min-width: 0;
}

.fp-sidebar__recent-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 3px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.fp-sidebar__recent-item:hover .fp-sidebar__recent-title {
  color: var(--color-accent);
}

.fp-sidebar__recent-date {
  font-size: 11px;
  color: var(--color-text-light);
  margin: 0;
}

/* サイト紹介BOX */
.fp-sidebar__about {
  background: linear-gradient(to right, #2563EB, #60A5FA);
  border-radius: 12px;
  padding: 20px;
}

.fp-sidebar__about-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-white);
  margin: 0 0 8px;
}

.fp-sidebar__about-text {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,.85);
  margin: 0 0 16px;
}

.fp-sidebar__about-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.4);
  transition: color 0.15s, border-color 0.15s;
}

.fp-sidebar__about-link:hover {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.4);
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 1024px) {
  .fp-hero__grid {
    grid-template-columns: 1fr;
  }

  .fp-hero__img-wrap {
    height: 320px;
  }

  .fp-featured__list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .fp-featured__item {
    flex: 1 1 calc(50% - 5px);
  }
}

@media (max-width: 768px) {
  .fp-hero__inner {
    padding: 20px 16px;
  }

  .fp-hero__img-wrap {
    height: 240px;
  }

  .fp-hero__category { display: none; }
  .fp-hero__meta { display: none; }

  .fp-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    padding: 12px;
  }

  .fp-hero__title {
    font-size: 15px;
  }

  .fp-hero__excerpt {
    font-size: 12px;
    margin-bottom: 0;
  }

  .fp-featured__list {
    flex-direction: column;
  }

  .fp-featured__item {
    flex: none;
  }


  .fp-main {
    padding: 24px 0 40px;
  }

  .fp-main__inner {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 24px;
  }

  .fp-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Cocoon コンテナリセット（カテゴリページ）
   category.php が fp-body をフル幅で展開できるよう
   #content-in(.wrap) と #main のレイアウト制約を解除する
   ============================================ */

.category #content,
.category #content-in {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.category #main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.category #sidebar {
  display: none !important;
}

/* ============================================
   カテゴリページ
   ============================================ */

.cat-header {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  color: #fff;
  padding: 48px 0 40px;
}

.cat-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.cat-header__breadcrumb {
  font-size: 13px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.cat-header__breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.cat-header__breadcrumb a:hover {
  text-decoration: underline;
}

.cat-header__sep {
  margin: 0 6px;
}

.cat-header__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.3;
  color: #fff;
}

.cat-header__count {
  font-size: 14px;
  opacity: 0.75;
  margin: 0;
}

/* ページネーション */
.cat-pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cat-pagination .page-numbers.current,
.cat-pagination .page-numbers:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* 記事なし */
.cat-no-posts {
  padding: 40px;
  text-align: center;
  color: var(--color-text-light);
}

@media (max-width: 768px) {
  .cat-header {
    padding: 32px 0 24px;
  }

  .cat-header__title {
    font-size: 20px;
  }
}

/* ============================================
   Cocoon コンテナリセット（投稿ページ）
   ============================================ */

.single #content,
.single #content-in {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.single #main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.single #sidebar {
  display: none !important;
}

/* ============================================
   投稿ページ
   ============================================ */

/* 記事カード */
.single-article {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
}

/* パンくずリスト */
.single-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 16px 20px 12px;
  font-size: 13px;
  color: var(--color-text-light);
  background: var(--color-white);
}

.single-breadcrumb a {
  color: var(--color-text-light);
  text-decoration: none;
}

.single-breadcrumb a:hover {
  color: var(--color-accent);
}

.single-breadcrumb__sep {
  color: var(--color-border);
}

.single-breadcrumb__current {
  color: var(--color-text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* アイキャッチ画像 */
.single-hero__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.single-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-hero__category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* タイトル・メタ */
.single-content {
  padding: 28px;
}

.single-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
  margin: 0 0 16px;
  padding: 0;
}

/* Cocoonデフォルトの entry-title padding を上書き */
.single .entry-title {
  padding: 0 !important;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

/* 本文 */
.single-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
}

.single-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  border-top: 2px solid #1e293b;
  border-bottom: 1px solid #e5e7eb;
  border-left: none;
  padding: 12px 0 10px;
  padding-left: 0;
  margin: 40px 0 20px;
}

.single-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 0 8px;
  margin: 32px 0 16px;
}

.single-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 24px 0 12px;
}

.single-body h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
  margin: 20px 0 10px;
}

.single-body h6 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
}

.single-body p {
  margin-bottom: 20px;
}

.single-body a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* 目次 */
.toc {
  margin-top: 40px;
  margin-bottom: 40px;
}

/* 目次リンク — .single-body a の青色を上書き */
.single-body .toc a {
  color: #333;
  text-decoration: none;
}

.single-body .toc a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* タグ */
.single-tags {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.single-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--color-border-light);
  color: var(--color-text-light);
  font-size: 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.single-tag:hover {
  background: var(--color-accent);
  color: #fff;
}

/* 前後記事ナビ */
.single-nav {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.single-nav a {
  font-size: 13px;
  color: var(--color-accent);
  text-decoration: none;
  line-height: 1.5;
  display: block;
}

.single-nav a:hover {
  text-decoration: underline;
}

.single-nav__next {
  text-align: right;
}

/* 関連記事（フル幅） */
.single-related {
  background: var(--color-bg);
  padding: 40px 0 60px;
}

.single-related__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.single-related__grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* ============================================
   投稿ページ - レスポンシブ
   ============================================ */

@media (max-width: 768px) {
  /* Cocoon .page-wrap の左右 padding を除去してフル幅に */
  .single .page-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 投稿ページ: fp-main のパディングを除去してフル幅に */
  .single .fp-main {
    padding: 0;
  }

  .single .fp-main__inner {
    padding: 0;
    gap: 0;
  }

  /* カードの角丸を除去してエッジトゥエッジ表示 */
  .single-article {
    border-radius: 0;
  }

  /* パンくずリストもエッジに合わせる */
  .single-breadcrumb {
    padding: 12px 16px 8px;
  }

  .single-content {
    padding: 20px 16px;
  }

  .single-title {
    font-size: 20px;
  }

  .single-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .single-nav {
    grid-template-columns: 1fr;
  }

  .single-related__grid {
    grid-template-columns: 1fr !important;
  }

  /* 記事本文: スマホではblockquoteのleft paddingを縮小 */
  body.single-post .single-body blockquote {
    padding-left: 36px;
  }

  /* 記事本文: コードブロックのpadding縮小 */
  body.single-post .single-body pre {
    padding: 16px;
  }
}
/* ============================================
   記事本文スタイル（claude-code-spec.md 準拠）
   適用スコープ: body.single-post .single-body
   ============================================ */

/* 見出し */
body.single-post .single-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  border-top: none;
  border-bottom: 1px solid #e5e7eb;
  border-left: none;
  background: none;
  border-radius: 0;
  padding: 0 0 10px;
  margin: 60px 0 32px;
}

body.single-post .single-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  background: none;
  border-radius: 0;
  padding: 0 0 8px;
  margin: 48px 0 24px;
}

body.single-post .single-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  border: none;
  background: none;
  margin: 24px 0 12px;
  padding: 0;
}

body.single-post .single-body h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
  margin: 20px 0 10px;
}

body.single-post .single-body h6 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
}

/* リスト */
/* リスト — .toc / .toc ul / .toc ol / .toc li を :not() で除外
   Cocoon TOC クラス: .toc, .toc-content, .toc ul, .toc ol, .toc li */

body.single-post .single-body ul:not(.toc ul) {
  list-style: none;
  margin: 0 0 1.4em;
  padding-left: 0;
}

body.single-post .single-body ul:not(.toc ul) > li:not(.toc li) {
  position: relative;
  padding-left: 1.4em;
  margin: 0 0 0.35em;
  line-height: 1.75;
}

body.single-post .single-body ul:not(.toc ul) > li:not(.toc li)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f46e5;
}

body.single-post .single-body ul:not(.toc ul) ul:not(.toc ul) {
  margin-top: 0.5em;
  margin-bottom: 0.2em;
}

body.single-post .single-body ul:not(.toc ul) ul:not(.toc ul) > li:not(.toc li)::before {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  top: 0.72em;
  background: #a5b4fc;
}

body.single-post .single-body ol:not(.toc ol) {
  list-style: none;
  counter-reset: ol-counter;
  margin: 0 0 1.4em;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

body.single-post .single-body ol:not(.toc ol) > li:not(.toc li) {
  counter-increment: ol-counter;
  padding: 0.7em 0.9em 0.7em 2.8em;
  position: relative;
  border-radius: 8px;
  color: #374151;
  background: #f8fafc;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.7;
}

body.single-post .single-body ol:not(.toc ol) > li:not(.toc li):hover {
  background: #eef2ff;
  border-color: #e0e7ff;
}

body.single-post .single-body ol:not(.toc ol) > li:not(.toc li)::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0.7em;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: #4f46e5;
  color: #fff;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* list-8（枠囲みリスト） */
body.single-post .single-body .list-8 {
  position: relative;
  padding: 1.8em 1em 0;
  border: 2px solid #4f46e5;
  border-radius: 6px;
  margin: 0 0 1.4em;
}

body.single-post .single-body .list-8 > div {
  position: absolute;
  top: -0.75em;
  left: 1em;
  padding: 0 0.5em;
  background: #fff;
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.95rem;
}

body.single-post .single-body .list-8 ul > li::before {
  background: #4f46e5;
}

/* チェックリスト (ul.list-3) */
body.single-post .single-body ul.list-3 {
  list-style: none !important;
  margin: 0 0 1.4em !important;
  padding: 1em 1em 1em 1.2em !important;
  border: 2px solid #4f46e5 !important;
  border-radius: 6px !important;
  background: none !important;
}

/* ul:not(.toc ul) の丸ドット ::before を無効化 */
body.single-post .single-body ul.list-3 > li::before {
  content: none !important;
  display: none !important;
}

body.single-post .single-body ul.list-3 > li {
  position: relative !important;
  padding-left: 1.8em !important;
  margin: 0 0 0.35em !important;
  line-height: 1.75 !important;
  background: none !important;
}

body.single-post .single-body ul.list-3 > li::after {
  content: "\2713" !important;   /* ✓ Unicode — 絵文字フォールバック防止 */
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #4f46e5 !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  font-style: normal !important;
}

/* ボックス類 */
body.single-post .single-body .box {
  display: flex;
  gap: 12px;
  border-top: 1px solid;
  border-bottom: 1px solid;
  padding: 14px 4px;
  margin: 24px 0;
  background: none;
}

body.single-post .single-body .box-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.5;
}

body.single-post .single-body .box-body { flex: 1; }

body.single-post .single-body .box-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

body.single-post .single-body .box-warning { border-color: #fcd34d; }
body.single-post .single-body .box-warning .box-title { color: #d97706; }

body.single-post .single-body .box-danger { border-color: #fca5a5; }
body.single-post .single-body .box-danger .box-title { color: #dc2626; }

body.single-post .single-body .box-tips { border-color: #6ee7b7; }
body.single-post .single-body .box-tips .box-title { color: #059669; }

body.single-post .single-body .box-info { border-color: #a5b4fc; }
body.single-post .single-body .box-info .box-title { color: #4f46e5; }

/* 引用（blockquote） */
body.single-post .single-body blockquote {
  position: relative;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 16px 20px 20px 52px;  /* left: クォートマーク分の余白 */
  margin: 24px 0;
  background: none;
  font-style: normal;
  color: #374151;
}

/* 左上クォートマーク（枠内・左端） */
body.single-post .single-body blockquote::before {
  content: '\201C';
  position: absolute;
  top: 10px;
  left: 14px;
  color: #a5b4fc;
  font-size: 4rem;
  line-height: 1;
}

/* 右下クォートは削除（テキストへの干渉を防ぐ） */
body.single-post .single-body blockquote::after {
  content: none;
}

body.single-post .single-body blockquote p { padding-left: 0; }

body.single-post .single-body blockquote cite {
  display: block;
  text-align: right;
  color: #6b7280;
  font-size: 0.85rem;
  font-style: normal;
}

/* インラインコード */
body.single-post .single-body :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.15em 0.5em;
  word-break: break-word;
}

/* コードブロック (pre) */
body.single-post .single-body pre {
  background: #0f172a;
  border-radius: 10px;
  padding: 22px 24px;
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 1.6em;
}

body.single-post .single-body pre > code {
  display: block;
  background: none;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.75;
  padding: 0;
  border: none;
  white-space: pre;
}

/* カスタムコードブロック (.code-wrap) */
body.single-post .single-body .code-wrap {
  max-width: 100%;
  margin: 24px 0;
  /* overflow: hidden を削除 — 横スクロールを妨げるため */
}

body.single-post .single-body .code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  border: 1px solid #334155;
  border-bottom: none;
  padding: 8px 12px;
  border-radius: 10px 10px 0 0;  /* code-wrap の overflow: hidden 廃止に伴い個別設定 */
}

body.single-post .single-body .code-lang {
  color: #64748b;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body.single-post .single-body .code-copy {
  background: none;
  border: 1px solid #475569;
  color: #94a3b8;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

body.single-post .single-body .code-copy:hover {
  border-color: #94a3b8;
  color: #cbd5e1;
}

body.single-post .single-body .code-body {
  background: #0f172a;
  border: 1px solid #334155;
  border-top: none;
  padding: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 10px 10px;
}

body.single-post .single-body .code-body code {
  background: none;
  border: none;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.75;
  padding: 0;
  white-space: pre;       /* 折り返し禁止 → overflow-x: auto で横スクロール */
  display: block;
}

/* テーブル */
body.single-post .single-body table {
  width: 100%;
  min-width: 480px;   /* この幅を超えると横スクロール発生 */
  border-collapse: collapse;
  margin: 0 0 1.8em;
  font-size: 0.92rem;
}

body.single-post .single-body thead th {
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  border: none;
}

body.single-post .single-body thead th:first-child { border-radius: 4px 0 0 0; }
body.single-post .single-body thead th:last-child  { border-radius: 0 4px 0 0; }

body.single-post .single-body tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  border-left: none;
  border-right: none;
  color: #374151;
  vertical-align: top;
}

body.single-post .single-body tbody tr:nth-child(even) td { background: #f8fafc; }
body.single-post .single-body tbody tr:last-child td { border-bottom: none; }

body.single-post .single-body .table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow-x: auto;              /* overflow: hidden を削除 — 競合解消 */
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.8em;
}

body.single-post .single-body .table-wrap table { margin: 0; }

/* ボタン */
body.single-post .single-body .btn-primary,
body.single-post .single-body .btn-outline,
body.single-post .single-body .btn-text {
  display: inline-block;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.6em 1.5em;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

body.single-post .single-body .btn-primary {
  background: #1e293b;
  color: #fff;
  border: 2px solid #1e293b;
}

body.single-post .single-body .btn-primary:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

body.single-post .single-body .btn-outline {
  background: none;
  color: #4f46e5;
  border: 2px solid #4f46e5;
}

body.single-post .single-body .btn-outline:hover {
  background: #4f46e5;
  color: #fff;
}

body.single-post .single-body .btn-text {
  background: none;
  color: #4f46e5;
  border: none;
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1.5px solid #c7d2fe;
  border-radius: 0;
}

body.single-post .single-body .btn-text:hover {
  border-bottom-color: #4f46e5;
  color: #4338ca;
}

/* テーブルヘッダー内リンク */
body.single-post .single-body thead th a {
  color: #fff;
  text-decoration: underline;
}

body.single-post .single-body thead th a:hover {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}
/* ヘッダーロゴ固定化 */
.header-container-in.hlt-top-menu .logo-header img {
    width: auto !important;
    max-height: 60px !important;
    height: auto !important;
}