/*
Theme Name: AFFINGER Child (ZIDAI M&A WIRED-style)
Template: affinger
Description: ZIDAI M&A - WIRED.jp風デザイン
Version: 20260420
*/

/* =========================================
   1. デザインシステム（変数）
   ========================================= */
:root {
  --zm-ink:   #0a0a0a;
  --zm-white: #ffffff;
  --zm-gray-100: #f5f5f5;
  --zm-gray-200: #e5e5e5;
  --zm-gray-300: #d4d4d4;
  --zm-gray-500: #6b6b6b;
  --zm-gray-700: #3d3d3d;
  --zm-accent-yellow: #ffe14f;
  --zm-bg: #f4f3f0;

  --zm-font-sans-en: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --zm-font-sans-jp: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --zm-font-display: 'Inter', 'Noto Sans JP', sans-serif;

  --zm-container-max: 1400px;
}

/* =========================================
   2. AFFINGER装飾の完全リセット
   ========================================= */
html { background: var(--zm-bg) !important; margin: 0 !important; padding: 0 !important; }
html body.zidaima-wired {
  font-family: var(--zm-font-sans-jp) !important;
  color: var(--zm-ink);
  background: var(--zm-bg) !important;
  background-color: var(--zm-bg) !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  display: block !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt";
}
/* 子テーマのトップレベル要素を全幅に強制 */
html body.zidaima-wired > .zm-header,
html body.zidaima-wired > #zm-site-content,
html body.zidaima-wired > .zm-footer {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  display: block !important;
  position: relative;
}
html body.zidaima-wired > .zm-header { position: sticky; top: 0; z-index: 100; }
html body.zidaima-wired main,
html body.zidaima-wired main.zm-article,
html body.zidaima-wired main.zm-main,
html body.zidaima-wired .zm-article,
html body.zidaima-wired .zm-main,
html body.zidaima-wired #zm-site-content {
  width: auto !important;
  max-width: var(--zm-container-max) !important;
  float: none !important;
  display: block !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  clear: both !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html body.zidaima-wired #zm-site-content {
  max-width: none !important;
  margin: 0 !important;
}
/* 親テーマが<main>や<article>に付けるレイアウト（float/width/%）を無効化 */
html body.zidaima-wired main,
html body.zidaima-wired article,
html body.zidaima-wired section {
  float: none !important;
  clear: both !important;
}
/* 親テーマのラッパー類を全てリセット（max-width/padding/背景） */
body.zidaima-wired #wrapper,
body.zidaima-wired #container,
body.zidaima-wired #content,
body.zidaima-wired #contentInner,
body.zidaima-wired #main,
body.zidaima-wired .st-contents-in,
body.zidaima-wired .wrap,
body.zidaima-wired .content,
body.zidaima-wired .st-page-container,
body.zidaima-wired .page-content,
body.zidaima-wired .post,
body.zidaima-wired .post-inner,
body.zidaima-wired .entry-content,
body.zidaima-wired .entry,
body.zidaima-wired article.post,
body.zidaima-wired #st-main,
body.zidaima-wired .content-in,
body.zidaima-wired .l-content {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  float: none !important;
}
/* 親テーマの不要要素を全て非表示 */
/* 親テーマのレイアウト系要素を非表示（自前ヘッダー/フッター/サイドバー/パンくず等を使うため）
   ※ 記事本文内のAFFINGERコンポーネント（.kanren 合わせて読みたい・.ad-shortcode 等）は非表示にしない */
body.zidaima-wired #header,
body.zidaima-wired .st-header,
body.zidaima-wired #footer,
body.zidaima-wired .st-footer,
body.zidaima-wired #sidebar,
body.zidaima-wired .st-sidebar,
body.zidaima-wired aside.sidebar,
body.zidaima-wired #side,
body.zidaima-wired #header_top,
body.zidaima-wired #st-header-top,
body.zidaima-wired #navi,
body.zidaima-wired #navi-in,
body.zidaima-wired #s-navi,
body.zidaima-wired .st-header-logo,
body.zidaima-wired #header_top_slide,
body.zidaima-wired .st-header-banner-area,
body.zidaima-wired #copyright,
body.zidaima-wired .st-up-btn,
body.zidaima-wired .st-pankuzu,
body.zidaima-wired #breadcrumb,
body.zidaima-wired .breadcrumb,
body.zidaima-wired .post-meta-key,
body.zidaima-wired #pickup_post,
body.zidaima-wired .entry-title,
body.zidaima-wired .post-date,
body.zidaima-wired .post-meta,
body.zidaima-wired #scontent,
body.zidaima-wired .sidearea,
body.zidaima-wired .st-navi-menu-wrap { display: none !important; }

body.zidaima-wired * { box-sizing: border-box; }
body.zidaima-wired a { color: inherit; text-decoration: none; transition: opacity .2s ease; }
body.zidaima-wired a:hover { opacity: .7; }
body.zidaima-wired img { max-width: 100%; height: auto; display: block; }

/* =========================================
   3. ヘッダー（1行・WIRED風）
   ========================================= */
.zm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--zm-white);
  border-bottom: 1px solid var(--zm-gray-200);
}
.zm-header .zm-header-inner { position: relative; }
.zm-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--zm-container-max);
  margin: 0 auto;
  padding: 14px 24px;
}
.zm-menu-toggle {
  background: transparent; border: 0; cursor: pointer; padding: 4px;
  display: none;  /* PCでは非表示、モバイルで表示 */
  flex-direction: column; gap: 5px; flex-shrink: 0;
}
.zm-menu-toggle span { display: block; width: 20px; height: 2px; background: var(--zm-ink); transition: transform .2s ease, opacity .2s ease; }
.zm-menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.zm-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.zm-menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.zm-header-logo {
  display: block !important; flex-shrink: 0 !important;
  line-height: 0 !important; max-width: none !important; width: auto !important;
  padding: 0 !important; margin: 0 !important;
}
.zm-header-logo img,
.zm-header .zm-header-logo img,
body.zidaima-wired .zm-header-logo img {
  width: auto !important; max-width: none !important;
  height: 28px !important; max-height: 28px !important;
  display: block !important; object-fit: contain !important;
}
.zm-nav {
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.zm-nav::-webkit-scrollbar { display: none; }
.zm-nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 24px; white-space: nowrap;
}
.zm-nav-list li a {
  display: block;
  font-family: var(--zm-font-sans-jp);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--zm-ink);
}
.zm-nav-list li a:hover { opacity: .55; }

.zm-header-right {
  display: flex; align-items: center; gap: 20px;
  flex-shrink: 0; margin-left: auto;
}
.zm-search-toggle {
  background: transparent; border: 0; cursor: pointer;
  color: var(--zm-ink); padding: 4px;
  display: flex; align-items: center;
  transition: opacity .2s ease;
}
.zm-search-toggle:hover { opacity: .55; }

/* 検索オーバーレイ */
.zm-search-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--zm-white);
  border-top: 1px solid var(--zm-gray-200);
  border-bottom: 1px solid var(--zm-gray-200);
  padding: 20px 24px;
  z-index: 99;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.zm-search-form {
  max-width: var(--zm-container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.zm-search-input {
  flex: 1;
  border: 0;
  border-bottom: 2px solid var(--zm-ink);
  background: transparent;
  padding: 10px 4px;
  font-size: 18px;
  font-family: var(--zm-font-sans-jp);
  outline: none;
  color: var(--zm-ink);
}
.zm-search-input::placeholder { color: var(--zm-gray-500); }
.zm-search-submit,
.zm-search-close {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--zm-ink);
  padding: 8px;
  display: flex;
  align-items: center;
  transition: opacity .2s ease;
}
.zm-search-submit:hover,
.zm-search-close:hover { opacity: .55; }
.zm-search-submit {
  background: var(--zm-ink);
  color: var(--zm-white);
  border-radius: 999px;
  padding: 10px 14px;
}

/* モバイルメニュー */
.zm-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--zm-white);
  border-top: 1px solid var(--zm-gray-200);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  z-index: 98;
}
.zm-mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  max-height: 70vh;
  overflow-y: auto;
}
.zm-mobile-menu-list li { border-bottom: 1px solid var(--zm-gray-100); }
.zm-mobile-menu-list li:last-child { border-bottom: 0; }
.zm-mobile-menu-list a {
  display: block;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--zm-ink);
}
.zm-mobile-menu-list a:hover { background: var(--zm-gray-100); opacity: 1; }

/* =========================================
   4. メイン・コンテナ
   ========================================= */
.zm-main {
  max-width: var(--zm-container-max);
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* =========================================
   5. 共通UIパーツ（ピル・日付・プレースホルダ）
   ========================================= */
.zm-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.zm-pill {
  display: inline-block;
  font-family: var(--zm-font-sans-jp);
  font-size: 12px;
  font-weight: 500;
  color: var(--zm-ink);
  border: 1px solid var(--zm-gray-300);
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.zm-card-date {
  font-family: var(--zm-font-sans-jp);
  font-size: 13px;
  font-weight: 400;
  color: var(--zm-gray-500);
  letter-spacing: 0.02em;
}
.zm-card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--zm-gray-100), var(--zm-gray-200));
}
.zm-card-image-placeholder.zm-yellow {
  background: var(--zm-accent-yellow);
}

/* =========================================
   6. Featured（大きい1記事）+ 右バナー
   ========================================= */
.zm-featured {
  margin-bottom: 72px;
}
/* Featured + 固定280pxバナー。
   バナー280正方形がRow高さを決定し、Featuredがその高さにstretch */
.zm-featured-row {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: stretch;
}
/* バナー未設定時：Featured単独で全幅表示 */
.zm-featured-row--full {
  grid-template-columns: 1fr;
}
.zm-featured-row--full .zm-featured-card > a {
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.zm-featured-row--full .zm-featured-image {
  aspect-ratio: 16 / 9;
  height: auto;
}
.zm-featured-row--full .zm-featured-body {
  justify-content: flex-start;
}
.zm-featured-card {
  min-width: 0;
  height: 100%;
}
.zm-featured-card > a {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  height: 100%;
  align-items: stretch;
  color: inherit;
}
.zm-featured-image {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.zm-featured-image img,
body.zidaima-wired .zm-featured-image img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.zm-featured-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 右上バナー（320×320固定正方形・Row高さを決定） */
.zm-top-banner {
  width: 280px;
  height: 280px;
  overflow: hidden;
  border-radius: 4px;
}
.zm-top-banner a,
.zm-top-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zm-top-banner-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--zm-gray-100), var(--zm-gray-200));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--zm-gray-500);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.7;
  border: 2px dashed var(--zm-gray-300);
}
.zm-featured-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--zm-gray-100);
}
.zm-featured-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.zm-featured-card:hover .zm-featured-image img { transform: scale(1.03); }
.zm-featured-body {
  padding: 0 8px 0 0;
}
.zm-featured-title {
  font-family: var(--zm-font-display);
  font-weight: 900;
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--zm-ink);
}
.zm-featured-excerpt {
  font-size: 15px;
  line-height: 1.8;
  color: var(--zm-gray-700);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   7. カード（統一3カラムグリッド）
   ========================================= */
.zm-cards-section {
  margin-bottom: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--zm-gray-200);
}
.zm-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
html body.zidaima-wired h2.zm-section-title,
.zm-section-title {
  font-family: var(--zm-font-display) !important;
  font-weight: 900 !important;
  font-size: 28px !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
  color: var(--zm-ink) !important;
}
.zm-section-more {
  font-family: var(--zm-font-sans-jp);
  font-size: 13px;
  font-weight: 600;
  color: var(--zm-ink) !important;
}
.zm-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
}
.zm-card {
  display: block;
}
.zm-card > a {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: inherit;
}
.zm-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--zm-gray-100);
}
.zm-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.zm-card:hover .zm-card-image img { transform: scale(1.03); }
.zm-card-body {
  display: flex;
  flex-direction: column;
}
.zm-card-title {
  font-family: var(--zm-font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--zm-ink);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.zm-card a:hover .zm-card-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 新着記事セクションの左端バナー広告 */
.zm-latest-banner {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 4px;
  display: flex;
}
.zm-latest-banner a,
.zm-latest-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zm-latest-banner-placeholder {
  width: 100%;
  min-height: 260px;
  flex: 1;
  background: linear-gradient(135deg, var(--zm-gray-100), var(--zm-gray-200));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--zm-gray-500);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.7;
  border: 2px dashed var(--zm-gray-300);
  border-radius: 4px;
}
/* ディスクリプション付きカード（LATEST用） */
.zm-card-with-excerpt .zm-card-title {
  margin-bottom: 16px;
  -webkit-line-clamp: 4;
}
.zm-card-divider {
  width: 60px;
  height: 1px;
  background: var(--zm-ink);
  margin: 0 0 16px;
}
.zm-card-excerpt {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--zm-gray-700);
  margin: 0;
}

/* =========================================
   7b. 記事詳細ページ（sairu.co.jp風・ID指定で特異度最大化）
   ========================================= */
html body.zidaima-wired main#zm-single,
html body.zidaima-wired .zm-single-page {
  display: block !important;
  width: 100% !important;
  max-width: 1040px !important;
  float: none !important;
  clear: both !important;
  margin: 0 auto !important;
  padding: 32px 24px 80px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  box-sizing: border-box !important;
}
/* breadcrumb は 860px 中央、article はpadding分広げて 1000px */
html body.zidaima-wired #zm-single .zm-breadcrumb,
html body.zidaima-wired #zm-single > nav.zm-breadcrumb {
  max-width: 860px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}
html body.zidaima-wired #zm-single .zm-single-article,
html body.zidaima-wired #zm-single > article.zm-single-article {
  max-width: 1000px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 8px !important;
  box-sizing: border-box !important;
}
html body.zidaima-wired #zm-single .zm-single-related,
html body.zidaima-wired #zm-single > section.zm-single-related {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* article は白背景 + 大きめ余白で読みやすく */
html body.zidaima-wired main#zm-single > article.zm-single-article {
  border: 0 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04) !important;
  outline: 0 !important;
  background: var(--zm-white) !important;
  padding: 64px 72px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

/* 親テーマが記事外周に当てるレイアウトを無効化
   ※ 記事本文内 .zm-single-body は除外してAFFINGER のコンポーネントを生かす */
html body.zidaima-wired main#zm-single > *,
html body.zidaima-wired main#zm-single > article > * {
  float: none !important;
  clear: both !important;
}
html body.zidaima-wired main#zm-single > article,
html body.zidaima-wired main#zm-single > section,
html body.zidaima-wired main#zm-single > aside,
html body.zidaima-wired main#zm-single > nav,
html body.zidaima-wired main#zm-single > header,
html body.zidaima-wired main#zm-single > article > section,
html body.zidaima-wired main#zm-single > article > header,
html body.zidaima-wired main#zm-single > article > nav,
html body.zidaima-wired main#zm-single > article > figure {
  width: auto !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
}

/* パンくず */
#zm-single .zm-breadcrumb {
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--zm-gray-500);
}
#zm-single .zm-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#zm-single .zm-breadcrumb li { display: inline; }
#zm-single .zm-breadcrumb a {
  color: var(--zm-gray-500);
  text-decoration: none;
}
#zm-single .zm-breadcrumb a:hover { text-decoration: underline; }
#zm-single .zm-breadcrumb span { color: var(--zm-ink); }

/* 記事ヘッダー */
#zm-single .zm-single-head {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--zm-gray-200);
}
#zm-single .zm-single-category {
  margin-bottom: 16px;
}
#zm-single .zm-single-category a {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--zm-ink);
  border: 1px solid var(--zm-gray-300);
  padding: 4px 14px;
  border-radius: 999px;
}
#zm-single .zm-single-category a:hover {
  background: var(--zm-ink);
  color: var(--zm-white) !important;
  opacity: 1;
}
#zm-single .zm-single-title {
  font-family: var(--zm-font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--zm-ink);
}
#zm-single .zm-single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--zm-gray-500);
}
#zm-single .zm-single-date {
  font-family: var(--zm-font-sans-jp);
}
#zm-single .zm-single-updated {
  margin-left: 12px;
  color: var(--zm-gray-500);
}
#zm-single .zm-single-author-name {
  font-weight: 600;
  color: var(--zm-ink);
}

/* アイキャッチ画像 */
#zm-single .zm-single-hero {
  margin: 0 0 40px;
}
#zm-single .zm-single-hero img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 4px;
}

/* 目次 */
#zm-single .zm-single-toc {
  background: var(--zm-gray-100);
  border: 1px solid var(--zm-gray-200);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 0 0 48px;
}
#zm-single .zm-single-toc-title {
  font-family: var(--zm-font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--zm-ink);
}
#zm-single .zm-single-toc-list {
  list-style: none;
  counter-reset: toc-h2;
  padding: 0;
  margin: 0;
}
#zm-single .zm-single-toc-list .zm-toc-h2 {
  counter-increment: toc-h2;
  margin: 8px 0;
  padding-left: 0;
}
#zm-single .zm-single-toc-list .zm-toc-h2::before {
  content: counter(toc-h2) ". ";
  font-weight: 600;
  color: var(--zm-ink);
}
#zm-single .zm-single-toc-list .zm-toc-h3 {
  margin: 4px 0 4px 20px;
  padding-left: 0;
  font-size: 14px;
}
#zm-single .zm-single-toc-list a {
  color: var(--zm-gray-700);
  text-decoration: none;
  line-height: 1.7;
}
#zm-single .zm-single-toc-list a:hover {
  color: var(--zm-ink);
  text-decoration: underline;
}

/* 本文: AFFINGERのデフォルトスタイルを尊重。余白とフォントのみ軽く指定 */
#zm-single .zm-single-body {
  margin: 0 0 64px;
}
/* 本文内のクラス・ショートコード・ブロック等はAFFINGERのスタイルをそのまま活かす */

/* ========================================
   本文見出し直指定（AFFINGERカスタマイザー未動作に対する保険）
   h2: グラデ塗り、h3: 下ショートライン
   ======================================== */
#zm-single .zm-single-body h3:not([class^="is-style-"]):not([class*=" is-style-"]):not(.st-css-no):not(.post-card-title) {
  padding: 4px 0 4px 16px !important;
  margin: 2.2em 0 1em !important;
  border: none !important;
  border-left: 5px solid #0f5549 !important;
  background: transparent !important;
  font-family: var(--zm-font-sans-jp) !important;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  color: var(--zm-ink);
}
#zm-single .zm-single-body h3:not([class^="is-style-"]):not([class*=" is-style-"]):not(.st-css-no):not(.post-card-title)::before {
  content: none !important;
  display: none !important;
}
/* h4は軽いグレー下線 */
#zm-single .zm-single-body h4:not([class^="is-style-"]):not([class*=" is-style-"]) {
  padding-bottom: 8px;
  margin: 1.8em 0 .8em;
  border-bottom: 1px solid var(--zm-gray-200);
  font-weight: 700;
  font-size: 17px;
}

/* ========================================
   AFFINGER h2/h3装飾の打ち消し（記事本文.zm-single-body以外のh2/h3）
   ======================================== */
html body.zidaima-wired h2.zm-featured-title,
html body.zidaima-wired h2.zm-card-title,
html body.zidaima-wired h2.zm-section-title,
html body.zidaima-wired h2.zm-single-title,
html body.zidaima-wired h2.zm-single-cta-title,
html body.zidaima-wired h2.zm-single-related-title,
html body.zidaima-wired h2.zm-archive-title,
html body.zidaima-wired h2.zm-single-author-box-title,
html body.zidaima-wired h3.zm-card-title,
html body.zidaima-wired h3.zm-single-author-box-name {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: inherit !important;
}
/* 擬似要素でアイコンや装飾を出している場合も消す */
html body.zidaima-wired h2.zm-featured-title::before,
html body.zidaima-wired h2.zm-featured-title::after,
html body.zidaima-wired h2.zm-card-title::before,
html body.zidaima-wired h2.zm-card-title::after,
html body.zidaima-wired h2.zm-section-title::before,
html body.zidaima-wired h2.zm-section-title::after,
html body.zidaima-wired h2.zm-single-title::before,
html body.zidaima-wired h2.zm-single-title::after,
html body.zidaima-wired h2.zm-single-cta-title::before,
html body.zidaima-wired h2.zm-single-cta-title::after,
html body.zidaima-wired h2.zm-single-related-title::before,
html body.zidaima-wired h2.zm-single-related-title::after,
html body.zidaima-wired h2.zm-archive-title::before,
html body.zidaima-wired h2.zm-archive-title::after {
  content: none !important;
  display: none !important;
}

/* 目次（AFFINGER/st-toc/ez-toc/汎用toc）のデザインを clean な 点線アンダーライン 型に統一 */
#zm-single .zm-single-body .st-toc,
#zm-single .zm-single-body .ez-toc-v2_0_56,
#zm-single .zm-single-body .ez-toc,
#zm-single .zm-single-body #ez-toc-container,
#zm-single .zm-single-body #toc_container,
#zm-single .zm-single-body .toc {
  background: var(--zm-gray-100, #f5f5f5) !important;
  border: 1px solid var(--zm-gray-200, #e5e5e5) !important;
  border-radius: 6px !important;
  padding: 24px 32px !important;
  margin: 2em 0 !important;
  box-shadow: none !important;
}
/* 目次のタイトル（目次 [hide]） */
#zm-single .zm-single-body .ez-toc-title,
#zm-single .zm-single-body .toc_title,
#zm-single .zm-single-body .st-toc-title,
#zm-single .zm-single-body .toc_title_wrap {
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid var(--zm-ink, #000) !important;
  display: inline-block !important;
  margin: 0 auto 16px !important;
}
/* 目次リスト全体 */
#zm-single .zm-single-body .st-toc ul,
#zm-single .zm-single-body .st-toc ol,
#zm-single .zm-single-body .ez-toc-list,
#zm-single .zm-single-body #ez-toc-container ul,
#zm-single .zm-single-body #ez-toc-container ol,
#zm-single .zm-single-body #toc_container ul,
#zm-single .zm-single-body #toc_container ol,
#zm-single .zm-single-body .toc ul,
#zm-single .zm-single-body .toc ol {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* 各項目：三角形マーカー完全削除 + 点線アンダーライン（番号はAFFINGER任せ） */
#zm-single .zm-single-body .st-toc li,
#zm-single .zm-single-body .ez-toc-list li,
#zm-single .zm-single-body #ez-toc-container li,
#zm-single .zm-single-body #toc_container li,
#zm-single .zm-single-body .toc li {
  list-style: none !important;
  background: none !important;
  background-image: none !important;
  padding: 8px 0 10px 0 !important;
  margin: 0 !important;
  border-bottom: 1px dotted #ccc !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
/* 三角形・マーカー（AFFINGERのアイコン/擬似要素）完全削除 */
#zm-single .zm-single-body .st-toc li::before,
#zm-single .zm-single-body .ez-toc-list li::before,
#zm-single .zm-single-body #ez-toc-container li::before,
#zm-single .zm-single-body #toc_container li::before,
#zm-single .zm-single-body .toc li::before,
#zm-single .zm-single-body .st-toc li::marker,
#zm-single .zm-single-body .ez-toc-list li::marker {
  content: none !important;
  display: none !important;
}
/* AFFINGER系の一部が使う .st-toc-list の icon */
#zm-single .zm-single-body .st-toc i,
#zm-single .zm-single-body .ez-toc-list i,
#zm-single .zm-single-body .ez-toc a i.fa,
#zm-single .zm-single-body .ez-toc a i {
  display: none !important;
}
/* 幅広対応: 背景画像でアイコン表示されているケース */
#zm-single .zm-single-body .st-toc li a,
#zm-single .zm-single-body .ez-toc-list li a,
#zm-single .zm-single-body #ez-toc-container li a {
  background-image: none !important;
  padding-left: 0 !important;
}
/* ネストリスト */
#zm-single .zm-single-body .st-toc li ul,
#zm-single .zm-single-body .st-toc li ol,
#zm-single .zm-single-body .ez-toc-list li ul,
#zm-single .zm-single-body .ez-toc-list li ol {
  margin-top: 6px !important;
  padding-left: 1em !important;
}
#zm-single .zm-single-body .st-toc li li,
#zm-single .zm-single-body .ez-toc-list li li {
  font-size: 13px !important;
  border-bottom: 0 !important;
  padding: 4px 0 !important;
}
/* リンクスタイル */
#zm-single .zm-single-body .st-toc a,
#zm-single .zm-single-body .ez-toc-list a,
#zm-single .zm-single-body #ez-toc-container a,
#zm-single .zm-single-body #toc_container a,
#zm-single .zm-single-body .toc a {
  color: var(--zm-ink, #000) !important;
  text-decoration: none !important;
  font-weight: 400 !important;
}
#zm-single .zm-single-body .st-toc a:hover,
#zm-single .zm-single-body .ez-toc-list a:hover {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

/* タグ */
#zm-single .zm-single-tags {
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--zm-gray-200);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
#zm-single .zm-single-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--zm-gray-700);
  background: var(--zm-gray-100);
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
}
#zm-single .zm-single-tag:hover {
  background: var(--zm-ink);
  color: var(--zm-white) !important;
  opacity: 1;
}

/* 著者ボックス */
#zm-single .zm-single-author-box {
  margin: 48px 0 0;
  padding: 32px;
  background: var(--zm-gray-100);
  border-radius: 6px;
}
#zm-single .zm-single-author-box-title {
  font-family: var(--zm-font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--zm-gray-500);
  margin-bottom: 16px;
}
#zm-single .zm-single-author-box-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
#zm-single .zm-single-author-avatar {
  flex-shrink: 0;
}
#zm-single .zm-single-author-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}
#zm-single .zm-single-author-box-text {
  flex: 1;
  min-width: 0;
}
#zm-single .zm-single-author-box-name {
  font-family: var(--zm-font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--zm-ink);
}
#zm-single .zm-single-author-box-name a {
  color: var(--zm-ink);
  text-decoration: none;
}
#zm-single .zm-single-author-box-name a:hover { text-decoration: underline; }
#zm-single .zm-single-author-box-bio {
  font-size: 14px;
  line-height: 1.8;
  color: var(--zm-gray-700);
  margin: 0 0 8px;
}
#zm-single .zm-single-author-box-website {
  margin: 0;
  font-size: 13px;
}
#zm-single .zm-single-author-box-website a {
  color: #0066cc;
  text-decoration: none;
}
#zm-single .zm-single-author-box-website a:hover { text-decoration: underline; }

/* CTA */
#zm-single .zm-single-cta {
  margin: 48px 0 0;
  padding: 40px 32px;
  background: var(--zm-ink);
  color: var(--zm-white);
  border-radius: 6px;
  text-align: center;
}
#zm-single .zm-single-cta-title,
html body.zidaima-wired h2.zm-single-cta-title {
  font-family: var(--zm-font-display) !important;
  font-weight: 800 !important;
  font-size: 22px !important;
  margin: 0 0 12px !important;
  color: var(--zm-white) !important;
}
#zm-single .zm-single-cta-desc {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  margin: 0 0 24px;
}
#zm-single .zm-single-cta-button {
  display: inline-block;
  background: var(--zm-white);
  color: var(--zm-ink) !important;
  padding: 14px 40px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s ease;
}
#zm-single .zm-single-cta-button:hover {
  background: var(--zm-gray-200);
  opacity: 1;
}

/* 関連記事 */
#zm-single .zm-single-related {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--zm-gray-200);
}
html body.zidaima-wired h2.zm-single-related-title {
  font-family: var(--zm-font-display) !important;
  font-weight: 800 !important;
  font-size: 22px !important;
  margin: 0 0 28px !important;
  color: var(--zm-ink) !important;
}
#zm-single .zm-single-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
}
/* 関連記事カードは画像とテキストの幅を揃える */
#zm-single .zm-single-related-grid .zm-card,
#zm-single .zm-single-related-grid .zm-card > a,
#zm-single .zm-single-related-grid .zm-card-image,
#zm-single .zm-single-related-grid .zm-card-body {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}
#zm-single .zm-single-related-grid .zm-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* =========================================
   7c. カテゴリ・タグアーカイブページ
   ========================================= */
html body.zidaima-wired main#zm-archive,
html body.zidaima-wired .zm-archive {
  display: block !important;
  width: 100% !important;
  max-width: var(--zm-container-max) !important;
  float: none !important;
  clear: both !important;
  margin: 0 auto !important;
  padding: 32px 24px 80px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}
html body.zidaima-wired #zm-archive * {
  float: none !important;
}

#zm-archive .zm-breadcrumb {
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--zm-gray-500);
}
#zm-archive .zm-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#zm-archive .zm-breadcrumb li { display: inline; }
#zm-archive .zm-breadcrumb a {
  color: var(--zm-gray-500);
  text-decoration: none;
}
#zm-archive .zm-breadcrumb a:hover { text-decoration: underline; }
#zm-archive .zm-breadcrumb span { color: var(--zm-ink); }

#zm-archive .zm-archive-head {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--zm-gray-200);
}
#zm-archive .zm-archive-kicker {
  font-family: var(--zm-font-sans-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--zm-gray-500);
  margin: 0 0 12px;
  text-transform: uppercase;
}
#zm-archive .zm-archive-title {
  font-family: var(--zm-font-display);
  font-weight: 900;
  font-size: 40px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--zm-ink);
}
#zm-archive .zm-archive-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--zm-gray-700);
  margin: 0 0 16px;
  max-width: 800px;
}
#zm-archive .zm-archive-count {
  font-size: 13px;
  color: var(--zm-gray-500);
  margin: 0;
}

#zm-archive .zm-archive-grid-section {
  margin-bottom: 64px;
}
#zm-archive .zm-archive-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--zm-gray-500);
  font-size: 14px;
}
#zm-archive .zm-search-suggest {
  margin-top: 8px;
  font-size: 13px;
}
#zm-archive .zm-search-retry {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
#zm-archive .zm-search-retry input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--zm-gray-300);
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--zm-font-sans-jp);
}
#zm-archive .zm-search-retry button {
  padding: 12px 24px;
  background: var(--zm-ink);
  color: var(--zm-white);
  border: 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#zm-archive .zm-search-retry button:hover { opacity: .85; }

/* ページネーション */
.zm-pagination {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--zm-gray-200);
  display: flex;
  justify-content: center;
}
.zm-pagination .page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.zm-pagination .page-numbers li { margin: 0; }
.zm-pagination .page-numbers a,
.zm-pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-family: var(--zm-font-sans-jp);
  font-size: 13px;
  font-weight: 600;
  color: var(--zm-ink);
  background: var(--zm-white);
  border: 1px solid var(--zm-gray-200);
  border-radius: 4px;
  text-decoration: none;
  transition: all .2s ease;
}
.zm-pagination .page-numbers a:hover {
  background: var(--zm-ink);
  color: var(--zm-white) !important;
  border-color: var(--zm-ink);
  opacity: 1;
}
.zm-pagination .page-numbers .current {
  background: var(--zm-ink);
  color: var(--zm-white);
  border-color: var(--zm-ink);
}
.zm-pagination .page-numbers .dots {
  background: transparent;
  border: 0;
}

@media (max-width: 680px) {
  #zm-archive .zm-archive-title { font-size: 28px; }
  #zm-archive .zm-archive-head { margin-bottom: 32px; padding-bottom: 24px; }
  html body.zidaima-wired main#zm-archive { padding: 24px 16px 64px !important; }
}

/* =========================================
   8. フッター
   ========================================= */
.zm-footer {
  background: #0f5549;
  color: var(--zm-white);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.zm-footer-inner {
  max-width: var(--zm-container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.zm-footer-logo { margin-bottom: 32px; line-height: 0; }
.zm-footer-logo img { width: auto !important; height: 28px !important; max-height: 28px !important; display: block; }
.zm-footer-nav ul {
  list-style: none; padding: 0; margin: 0 0 48px;
  display: flex; flex-wrap: wrap; gap: 12px 28px;
}
.zm-footer-nav a {
  font-family: var(--zm-font-sans-jp);
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.7) !important;
}
.zm-footer-nav a:hover { color: var(--zm-white) !important; opacity: 1; }
.zm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.zm-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin: 0;
}
.zm-footer-meta {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 24px;
}
.zm-footer-meta a {
  font-size: 12px;
  color: rgba(255,255,255,0.5) !important;
}
.zm-footer-meta a:hover { color: var(--zm-white) !important; opacity: 1; }

/* =========================================
   9. その他
   ========================================= */
.zm-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--zm-gray-500);
  font-size: 14px;
}

/* =========================================
   10. レスポンシブ
   ========================================= */
@media (max-width: 1024px) {
  .zm-featured-row { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .zm-top-banner { width: 100%; max-width: 280px; height: auto; aspect-ratio: 1/1; margin: 0 auto; }
  .zm-featured-card { height: auto; }
  .zm-featured-card > a { grid-template-columns: 1fr; gap: 24px; height: auto; }
  .zm-featured-image { aspect-ratio: 16 / 9; height: auto; }
  .zm-featured-title { font-size: 28px; }
  .zm-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .zm-section-title { font-size: 24px; }
}
@media (max-width: 900px) {
  .zm-nav { display: none; }
  .zm-menu-toggle { display: flex; }  /* モバイルでハンバーガー表示 */
}
@media (max-width: 680px) {
  .zm-header-inner { padding: 12px 16px; gap: 16px; }
  .zm-header-logo img { height: 24px !important; max-height: 24px !important; }
  .zm-main { padding: 32px 16px 64px; }
  .zm-featured-title { font-size: 22px; }
  .zm-cards-grid { grid-template-columns: 1fr; gap: 32px; }
  .zm-card-title { font-size: 16px; }
  .zm-section-title { font-size: 20px; }
  .zm-footer { padding: 48px 0 24px; }
  .zm-footer-bottom { flex-direction: column; }
  .zm-footer-meta { flex-wrap: wrap; gap: 16px; }
}

/* 記事ページレスポンシブ */
@media (max-width: 1024px) {
  #zm-single .zm-single-title { font-size: 28px; }
  #zm-single .zm-single-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  html body.zidaima-wired main#zm-single > article.zm-single-article {
    padding: 48px 32px !important;
  }
}
@media (max-width: 680px) {
  html body.zidaima-wired main#zm-single { padding: 20px 16px 64px !important; }
  html body.zidaima-wired main#zm-single > article.zm-single-article {
    padding: 32px 20px !important;
    border-radius: 4px !important;
  }
  #zm-single .zm-single-title { font-size: 22px; line-height: 1.5; }
  /* 本文サイズはAFFINGERの設定に任せる */
  #zm-single .zm-single-toc { padding: 18px 20px; }
  #zm-single .zm-single-author-box { padding: 20px; }
  #zm-single .zm-single-cta { padding: 28px 20px; }
  #zm-single .zm-single-related-grid { grid-template-columns: 1fr; }
}
