@charset "UTF-8";

/* ==================================================
   AIガジェットラボ：下層ページ専用CSS
   対象：
   - 固定ページ（ホーム以外）
   - 投稿ページ
   - カテゴリーページ
   - アーカイブページ
   - 検索結果ページ

   注意：
   - ホームには適用しない
   - agl-home.css / agl-hero.css には干渉しない
   - まずはホームのPCヘッダーに近い見た目を再現
================================================== */


/* ==================================================
   下層ページ：基本変数
   ホームヘッダーの見た目をできるだけ再現
================================================== */

body.page:not(.home),
body.single,
body.category,
body.archive,
body.search {
  --agl-lower-header-bg: var(--agl-hero-bg);
  --agl-lower-header-card-bg: var(--agl-card-bg);
  --agl-lower-header-text: #063018;
  --agl-lower-header-hover: var(--agl-link-hover);
  --agl-lower-header-shadow: var(--agl-shadow-floating);
}


/* ==================================================
   下層ページ：基本背景
================================================== */

body.page:not(.home),
body.single,
body.category,
body.archive,
body.search {
  background: var(--agl-bg);
}


/* ==================================================
   下層ページ：PCヘッダー
   ホームと近い見た目。ただし fixed にはしない
================================================== */

@media screen and (min-width: 1024px) {

  body.page:not(.home) #header-container,
  body.page:not(.home) .header-container,
  body.single #header-container,
  body.single .header-container,
  body.category #header-container,
  body.category .header-container,
  body.archive #header-container,
  body.search #header-container,
  body.archive .header-container,
  body.search .header-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 100 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 18px 0 20px !important;
    background: var(--agl-lower-header-bg) !important;
    box-shadow: none !important;
  }

  body.page:not(.home) .header-container-in,
  body.single .header-container-in,
  body.category .header-container-in,
  body.archive .header-container-in,
  body.search .header-container-in {
    display: grid !important;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) !important;
    grid-template-areas: "brand nav" !important;
    align-items: center !important;
    gap: 32px !important;
    width: min(var(--agl-header-width), calc(100vw - 48px)) !important;
    max-width: var(--agl-header-width) !important;
    margin: 0 auto !important;
    padding: 17px 32px !important;
    background: var(--agl-lower-header-card-bg) !important;
    border-radius: var(--agl-radius-xl) !important;
    box-shadow: var(--agl-lower-header-shadow) !important;
    overflow: visible !important;
  }

  /* Cocoonヘッダー内の不要な背景・影を消す */
  body.page:not(.home) #header,
  body.page:not(.home) .header,
  body.page:not(.home) .header-in,
  body.page:not(.home) .logo-header,
  body.page:not(.home) #navi,
  body.page:not(.home) .navi,
  body.page:not(.home) .navi-in,
  body.single #header,
  body.single .header,
  body.single .header-in,
  body.single .logo-header,
  body.single #navi,
  body.single .navi,
  body.single .navi-in,
  body.category #header,
  body.category .header,
  body.category .header-in,
  body.category .logo-header,
  body.category #navi,
  body.category .navi,
  body.category .navi-in,
  body.archive #header,
  body.search #header,
  body.archive .header,
  body.search .header,
  body.archive .header-in,
  body.search .header-in,
  body.archive .logo-header,
  body.search .logo-header,
  body.archive #navi,
  body.search #navi,
  body.archive .navi,
  body.search .navi,
  body.archive .navi-in,
  body.search .navi-in {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  /* ロゴ・サイト名エリア */
  body.page:not(.home) #header,
  body.page:not(.home) .header,
  body.single #header,
  body.single .header,
  body.category #header,
  body.category .header,
  body.archive #header,
  body.search #header,
  body.archive .header,
  body.search .header {
    grid-area: brand !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.page:not(.home) .header-in,
  body.single .header-in,
  body.category .header-in,
  body.archive .header-in,
  body.search .header-in {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.page:not(.home) .logo-header,
  body.single .logo-header,
  body.category .logo-header,
  body.archive .logo-header,
  body.search .logo-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-self: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    line-height: 1 !important;
    transform: translateY(10px) !important;
  }

  body.page:not(.home) .tagline,
  body.single .tagline,
  body.category .tagline,
  body.archive .tagline,
  body.search .tagline {
    display: none !important;
  }


  /* ==================================================
     下層ページ：PCロゴ
     ホームと同じ2段ロゴ
  ================================================== */

  body.page:not(.home) .logo-header a,
  body.page:not(.home) .site-name-text,
  body.single .logo-header a,
  body.single .site-name-text,
  body.category .logo-header a,
  body.category .site-name-text,
  body.archive .logo-header a,
  body.search .logo-header a,
  body.archive .site-name-text,
  body.search .site-name-text {
    display: inline-flex !important;
    align-items: center !important;
    color: var(--agl-logo-text-color) !important;
    text-decoration: none !important;
    line-height: var(--agl-logo-line-height) !important;
    vertical-align: middle !important;
  }

  body.page:not(.home) .site-name-text,
  body.single .site-name-text,
  body.category .site-name-text,
  body.archive .site-name-text,
  body.search .site-name-text {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 4px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
  }

  body.page:not(.home) .site-name-text::before,
  body.single .site-name-text::before,
  body.category .site-name-text::before,
  body.archive .site-name-text::before,
  body.search .site-name-text::before {
    content: "AI GADGET LAB";
    white-space: nowrap;
    display: block;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: 31px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 0.8;
    -webkit-text-stroke: 0.3px currentColor;
    color: transparent;
    background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    transform: none;
  }

  body.page:not(.home) .site-name-text::after,
  body.single .site-name-text::after,
  body.category .site-name-text::after,
  body.archive .site-name-text::after,
  body.search .site-name-text::after {
    content: "AIガジェットラボ";
    display: block;
    margin-top: 0;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: 11px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: right;
    color: #6b7280;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    transform: none;
  }


  /* ==================================================
     下層ページ：PCナビ
  ================================================== */

  body.page:not(.home) #navi,
  body.page:not(.home) .navi,
  body.single #navi,
  body.single .navi,
  body.category #navi,
  body.category .navi,
  body.archive #navi,
  body.search #navi,
  body.archive .navi,
  body.search .navi {
    grid-area: nav !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.page:not(.home) .navi-in,
  body.single .navi-in,
  body.category .navi-in,
  body.archive .navi-in,
  body.search .navi-in {
    display: flex !important;
    justify-content: flex-end !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.page:not(.home) .navi-in > ul,
  body.single .navi-in > ul,
  body.category .navi-in > ul,
  body.archive .navi-in > ul,
  body.search .navi-in > ul {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: clamp(18px, 2.1vw, 30px) !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.page:not(.home) .navi-in > ul > li,
  body.single .navi-in > ul > li,
  body.category .navi-in > ul > li,
  body.archive .navi-in > ul > li,
  body.search .navi-in > ul > li {
    position: relative !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.page:not(.home) .navi-in > ul > li > a,
  body.page:not(.home) .navi-in > ul > li.current-menu-item > a,
  body.page:not(.home) .navi-in > ul > li.current_page_item > a,
  body.single .navi-in > ul > li > a,
  body.single .navi-in > ul > li.current-menu-item > a,
  body.single .navi-in > ul > li.current_page_item > a,
  body.category .navi-in > ul > li > a,
  body.category .navi-in > ul > li.current-menu-item > a,
  body.category .navi-in > ul > li.current_page_item > a,
  body.archive .navi-in > ul > li > a,
  body.search .navi-in > ul > li > a,
  body.archive .navi-in > ul > li.current-menu-item > a,
  body.search .navi-in > ul > li.current-menu-item > a,
  body.archive .navi-in > ul > li.current_page_item > a,
  body.search .navi-in > ul > li.current_page_item > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 !important;
    color: var(--agl-lower-header-text) !important;
    background: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transform: none !important;
    white-space: nowrap !important;
    transition: color 0.16s ease !important;
  }

  body.page:not(.home) .navi-in > ul > li > a:hover,
  body.page:not(.home) .navi-in > ul > li.current-menu-item > a,
  body.page:not(.home) .navi-in > ul > li.current_page_item > a,
  body.single .navi-in > ul > li > a:hover,
  body.single .navi-in > ul > li.current-menu-item > a,
  body.single .navi-in > ul > li.current_page_item > a,
  body.category .navi-in > ul > li > a:hover,
  body.category .navi-in > ul > li.current-menu-item > a,
  body.category .navi-in > ul > li.current_page_item > a,
  body.archive .navi-in > ul > li > a:hover,
  body.search .navi-in > ul > li > a:hover,
  body.archive .navi-in > ul > li.current-menu-item > a,
  body.search .navi-in > ul > li.current-menu-item > a,
  body.archive .navi-in > ul > li.current_page_item > a,
  body.search .navi-in > ul > li.current_page_item > a {
    color: var(--agl-lower-header-hover) !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.page:not(.home) .navi-in > ul > li > a::before,
  body.page:not(.home) .navi-in > ul > li > a::after,
  body.single .navi-in > ul > li > a::before,
  body.single .navi-in > ul > li > a::after,
  body.category .navi-in > ul > li > a::before,
  body.category .navi-in > ul > li > a::after,
  body.archive .navi-in > ul > li > a::before,
  body.search .navi-in > ul > li > a::before,
  body.archive .navi-in > ul > li > a::after,
  body.search .navi-in > ul > li > a::after {
    display: none !important;
    content: none !important;
  }


  /* 下層PCヘッダーでは、ホーム用の検索メニュー項目だけ非表示 */
  body.page:not(.home) .navi-in > ul > li:last-child,
  body.single .navi-in > ul > li:last-child,
  body.category .navi-in > ul > li:last-child,
  body.archive .navi-in > ul > li:last-child,
  body.search .navi-in > ul > li:last-child {
    display: none !important;
  }

}


/* ==================================================
   下層ページ：スマホ表示
   現段階ではCocoon純正スマホメニューを優先して大きく触らない
================================================== */

@media screen and (max-width: 1023px) {
  body.page:not(.home),
  body.single,
  body.category,
  body.archive,
  body.search {
    background: var(--agl-bg);
  }
}

/* ==================================================
   AIガジェットラボ：下層ページ スマホヘッダー
   - Cocoon純正モバイルメニューの機能は維持
   - 下層ページ上部だけをホーム風の角丸カードに整える
   - PC表示・ホーム表示には影響させない
================================================== */

@media screen and (max-width: 1023px) {

  body.page:not(.home) #header-container,
  body.page:not(.home) .header-container,
  body.single #header-container,
  body.single .header-container,
  body.category #header-container,
  body.category .header-container,
  body.archive #header-container,
  body.search #header-container,
  body.archive .header-container,
  body.search .header-container {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 14px 0 22px !important;
    background: var(--agl-lower-header-bg) !important;
    box-shadow: none !important;
  }

  body.page:not(.home) .header-container-in,
  body.single .header-container-in,
  body.category .header-container-in,
  body.archive .header-container-in,
  body.search .header-container-in {
    width: calc(100vw - 28px) !important;
    max-width: 720px !important;
    margin: 0 auto !important;
    padding: 18px 18px 20px !important;
    background: var(--agl-lower-header-card-bg) !important;
    border-radius: 24px !important;
    box-shadow: var(--agl-lower-header-shadow) !important;
    box-sizing: border-box !important;
  }

  body.page:not(.home) #header,
  body.page:not(.home) .header,
  body.page:not(.home) .header-in,
  body.page:not(.home) .logo-header,
  body.single #header,
  body.single .header,
  body.single .header-in,
  body.single .logo-header,
  body.category #header,
  body.category .header,
  body.category .header-in,
  body.category .logo-header,
  body.archive #header,
  body.search #header,
  body.archive .header,
  body.search .header,
  body.archive .header-in,
  body.search .header-in,
  body.archive .logo-header,
  body.search .logo-header {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-align: center !important;
  }

  body.page:not(.home) .tagline,
  body.single .tagline,
  body.category .tagline,
  body.archive .tagline,
  body.search .tagline {
    display: block !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    color: var(--agl-muted) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.7 !important;
    text-align: center !important;
  }

  body.page:not(.home) .logo-header,
  body.single .logo-header,
  body.category .logo-header,
  body.archive .logo-header,
  body.search .logo-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 0 !important;
    line-height: 1 !important;
  }

  body.page:not(.home) .logo-header a,
  body.page:not(.home) .site-name-text,
  body.single .logo-header a,
  body.single .site-name-text,
  body.category .logo-header a,
  body.category .site-name-text,
  body.archive .logo-header a,
  body.search .logo-header a,
  body.archive .site-name-text,
  body.search .site-name-text {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--agl-logo-text-color) !important;
    text-decoration: none !important;
    line-height: 1 !important;
  }

  body.page:not(.home) .site-name-text,
  body.single .site-name-text,
  body.category .site-name-text,
  body.archive .site-name-text,
  body.search .site-name-text {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    font-size: 0 !important;
  }

  body.page:not(.home) .site-name-text::before,
  body.single .site-name-text::before,
  body.category .site-name-text::before,
  body.archive .site-name-text::before,
  body.search .site-name-text::before {
    content: "AI GADGET LAB";
    white-space: nowrap;
    display: block;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: clamp(26px, 8vw, 36px);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 0.9;
    -webkit-text-stroke: 0.25px currentColor;
    color: transparent;
    background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }

  body.page:not(.home) .site-name-text::after,
  body.single .site-name-text::after,
  body.category .site-name-text::after,
  body.archive .site-name-text::after,
  body.search .site-name-text::after {
    content: "AIガジェットラボ";
    display: block;
    margin-top: 0;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: 11px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: right;
    color: #6b7280;
  }

  body.page:not(.home) #navi,
  body.page:not(.home) .navi,
  body.single #navi,
  body.single .navi,
  body.category #navi,
  body.category .navi,
  body.archive #navi,
  body.search #navi,
  body.archive .navi,
  body.search .navi {
    display: none !important;
  }
}


/* ==================================================
   AIガジェットラボ：下層ページ 本文デザイン
   - 固定ページ・投稿ページの本文を読みやすく整える
   - カテゴリーページ一覧・サイドバー・ホームには適用しない
   - 追記上書きではなく、このブロック内に集約
================================================== */

/* ページタイトル・投稿タイトル */
body.page:not(.home) .entry-title,
body.single .entry-title,
body.category .archive-title,
body.archive .archive-title,
body.search .archive-title {
  position: relative !important;
  margin: 0 0 28px !important;
  padding: 0 0 0 22px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--agl-text) !important;
  font-size: clamp(24px, 3.2vw, 34px) !important;
  font-weight: 900 !important;
  line-height: 1.38 !important;
  letter-spacing: -0.02em !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

body.page:not(.home) .entry-title::before,
body.single .entry-title::before,
body.category .archive-title::before,
body.archive .archive-title::before,
body.search .archive-title::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0.15em !important;
  width: 7px !important;
  height: 1.1em !important;
  border-radius: 999px !important;
  background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%) !important;
}

/* 本文全体 */
body.page:not(.home) .entry-content,
body.single .entry-content {
  color: #374151 !important;
  font-size: 16.5px !important;
  line-height: 2 !important;
}

body.page:not(.home) .entry-content p,
body.single .entry-content p {
  margin: 0 0 1.55em !important;
  color: #374151 !important;
  line-height: 2 !important;
}

/* 導入文：本文最初の段落をリードカード化 */
body.page:not(.home) .entry-content > p:first-of-type,
body.single .entry-content > p:first-of-type,
body.page:not(.home) .entry-content .agl-lead-box,
body.single .entry-content .agl-lead-box {
  margin: 0 0 34px !important;
  padding: 22px 24px !important;
  border: 1px solid rgba(34, 211, 238, 0.28) !important;
  border-radius: 18px !important;
  background: #f0f9ff !important;
  box-shadow: 0 12px 26px rgba(22, 135, 255, 0.08) !important;
  color: #374151 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.9 !important;
}

body.page:not(.home) .entry-content .agl-lead-box p,
body.single .entry-content .agl-lead-box p {
  margin: 0 !important;
  color: #374151 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.9 !important;
}

/* H2 */
body.page:not(.home) .entry-content h2,
body.single .entry-content h2 {
  position: relative !important;
  margin: 52px 0 24px !important;
  padding: 20px 24px 20px 28px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07) !important;
  color: var(--agl-text) !important;
  font-size: clamp(20px, 2.5vw, 26px) !important;
  font-weight: 900 !important;
  line-height: 1.45 !important;
  overflow: hidden !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

body.page:not(.home) .entry-content h2::before,
body.single .entry-content h2::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  display: block !important;
  width: 8px !important;
  height: auto !important;
  background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%) !important;
}

/* H3 */
body.page:not(.home) .entry-content h3,
body.single .entry-content h3 {
  position: relative !important;
  margin: 36px 0 18px !important;
  padding: 0 0 10px 30px !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(57, 181, 74, 0.24) !important;
  background: transparent !important;
  color: #063018 !important;
  font-size: clamp(20px, 2.3vw, 24px) !important;
  font-weight: 900 !important;
  line-height: 1.45 !important;
}

body.page:not(.home) .entry-content h3::before,
body.single .entry-content h3::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0.45em !important;
  width: 13px !important;
  height: 13px !important;
  border-radius: 50% !important;
  background: var(--agl-green) !important;
  box-shadow: 0 0 0 6px rgba(57, 181, 74, 0.13) !important;
}

/* リスト */
body.page:not(.home) .entry-content > ul,
body.page:not(.home) .entry-content > ol,
body.single .entry-content > ul,
body.single .entry-content > ol {
  margin: 18px 0 34px !important;
  padding: 22px 26px 22px 48px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
}

body.page:not(.home) .entry-content li,
body.single .entry-content li {
  margin: 0 0 10px !important;
  color: #374151 !important;
  font-weight: 700 !important;
  line-height: 1.8 !important;
}

body.page:not(.home) .entry-content li::marker,
body.single .entry-content li::marker {
  color: var(--agl-green) !important;
  font-weight: 900 !important;
}

/* Cocoon目次 */
body.page:not(.home) .entry-content .toc,
body.single .entry-content .toc {
  width: 100% !important;
  max-width: none !important;
  margin: 34px 0 44px !important;
  padding: 26px 30px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
}

body.page:not(.home) .entry-content .toc-title,
body.single .entry-content .toc-title {
  margin: 0 0 16px !important;
  color: #063018 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

body.page:not(.home) .entry-content .toc-title::before,
body.single .entry-content .toc-title::before {
  content: "INDEX";
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #39b54a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

body.page:not(.home) .entry-content .toc-content,
body.single .entry-content .toc-content {
  margin: 0 !important;
  padding: 0 !important;
}

body.page:not(.home) .entry-content .toc-list,
body.single .entry-content .toc-list,
body.page:not(.home) .entry-content .toc ol,
body.single .entry-content .toc ol,
body.page:not(.home) .entry-content .toc ul,
body.single .entry-content .toc ul {
  margin: 0 !important;
  padding: 0 0 0 24px !important;
  list-style-position: outside !important;
  box-sizing: border-box !important;
}

body.page:not(.home) .entry-content .toc li,
body.single .entry-content .toc li {
  margin: 0 0 10px !important;
  padding-left: 3px !important;
  color: #16a34a !important;
  font-weight: 900 !important;
  line-height: 1.75 !important;
}

body.page:not(.home) .entry-content .toc li::marker,
body.single .entry-content .toc li::marker {
  color: #16a34a !important;
  font-weight: 900 !important;
}

body.page:not(.home) .entry-content .toc a,
body.single .entry-content .toc a {
  color: var(--agl-text) !important;
  font-weight: 800 !important;
  line-height: 1.8 !important;
  text-decoration: none !important;
}

body.page:not(.home) .entry-content .toc a:hover,
body.single .entry-content .toc a:hover {
  color: var(--agl-link-hover) !important;
}

/* 表：単色ヘッダー＋最初の列アクセント */
body.page:not(.home) .entry-content .wp-block-table,
body.single .entry-content .wp-block-table,
body.page:not(.home) .entry-content .scrollable-table,
body.single .entry-content .scrollable-table,
body.page:not(.home) .entry-content .table-scroll,
body.single .entry-content .table-scroll {
  margin: 24px 0 38px !important;
  overflow-x: auto !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07) !important;
}

body.page:not(.home) .entry-content table,
body.single .entry-content table {
  width: 100% !important;
  min-width: 650px !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

body.page:not(.home) .entry-content table th,
body.single .entry-content table th {
  padding: 15px 16px !important;
  background: #063018 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.6 !important;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

body.page:not(.home) .entry-content table thead th:first-child,
body.single .entry-content table thead th:first-child {
  background: #39b54a !important;
  color: #ffffff !important;
}

body.page:not(.home) .entry-content table td,
body.single .entry-content table td {
  padding: 15px 16px !important;
  background: #ffffff !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.75 !important;
  text-align: left !important;
  vertical-align: top !important;
}

body.page:not(.home) .entry-content table tbody tr:nth-child(even) td,
body.single .entry-content table tbody tr:nth-child(even) td {
  background: #f5fbf7 !important;
}

body.page:not(.home) .entry-content table tbody td:first-child,
body.single .entry-content table tbody td:first-child {
  background: #f0fdf4 !important;
  color: #063018 !important;
  font-weight: 900 !important;
  border-left: 4px solid #39b54a !important;
}

body.page:not(.home) .entry-content table tbody tr:nth-child(even) td:first-child,
body.single .entry-content table tbody tr:nth-child(even) td:first-child {
  background: #eaf8ef !important;
  color: #063018 !important;
}

/* 引用 */
body.page:not(.home) .entry-content blockquote,
body.single .entry-content blockquote {
  margin: 28px 0 36px !important;
  padding: 22px 24px !important;
  border: 0 !important;
  border-left: 6px solid var(--agl-purple) !important;
  border-radius: 16px !important;
  background: #f8fafc !important;
  color: #4b5563 !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04) !important;
}

body.page:not(.home) .entry-content blockquote p,
body.single .entry-content blockquote p {
  margin: 0 !important;
  color: #4b5563 !important;
  font-weight: 700 !important;
}

/* カスタムHTML：注意・補足ボックス */
body.page:not(.home) .entry-content .agl-note,
body.single .entry-content .agl-note {
  margin: 28px 0 36px !important;
  padding: 22px 24px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
}

body.page:not(.home) .entry-content .agl-note strong,
body.single .entry-content .agl-note strong {
  display: inline-flex !important;
  margin: 0 0 10px !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  background: var(--agl-orange) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.08em !important;
}

body.page:not(.home) .entry-content .agl-note p,
body.single .entry-content .agl-note p {
  margin: 0 !important;
}

/* カスタムHTML：POINTボックス */
body.page:not(.home) .entry-content .agl-point-box,
body.single .entry-content .agl-point-box {
  margin: 28px 0 36px !important;
  padding: 28px 26px 24px !important;
  border: 1px solid rgba(57, 181, 74, 0.24) !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
  box-shadow: 0 14px 30px rgba(57, 181, 74, 0.11) !important;
}

body.page:not(.home) .entry-content .agl-point-box__label,
body.single .entry-content .agl-point-box__label {
  display: inline-flex !important;
  margin: 0 0 12px !important;
  padding: 5px 13px !important;
  border-radius: 999px !important;
  background: var(--agl-green) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.08em !important;
}

body.page:not(.home) .entry-content .agl-point-box p:last-child,
body.single .entry-content .agl-point-box p:last-child {
  margin-bottom: 0 !important;
}

/* カスタムHTML：比較カード */
body.page:not(.home) .entry-content .agl-compare-box,
body.single .entry-content .agl-compare-box {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  margin: 28px 0 36px !important;
  padding: 24px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
}

body.page:not(.home) .entry-content .agl-compare-box__title,
body.single .entry-content .agl-compare-box__title {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 0 18px !important;
  padding: 7px 15px !important;
  border-radius: 999px !important;
  background: #063018 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.04em !important;
  box-shadow: none !important;
}

body.page:not(.home) .entry-content .agl-compare-box__grid,
body.single .entry-content .agl-compare-box__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.page:not(.home) .entry-content .agl-compare-box__grid > div,
body.single .entry-content .agl-compare-box__grid > div {
  padding: 20px !important;
  border: 1px solid rgba(57, 181, 74, 0.22) !important;
  border-radius: 16px !important;
  background: #f5fbf7 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04) !important;
}

body.page:not(.home) .entry-content .agl-compare-box__grid strong,
body.single .entry-content .agl-compare-box__grid strong {
  display: block !important;
  margin: 0 0 8px !important;
  color: #063018 !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
}

body.page:not(.home) .entry-content .agl-compare-box__grid p,
body.single .entry-content .agl-compare-box__grid p {
  margin: 0 !important;
  color: #374151 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.8 !important;
}

/* スマホ調整 */
@media screen and (max-width: 1023px) {
  body.page:not(.home) .entry-content,
  body.single .entry-content {
    font-size: 15.5px !important;
  }

  body.page:not(.home) .entry-content > p:first-of-type,
  body.single .entry-content > p:first-of-type,
  body.page:not(.home) .entry-content .agl-lead-box,
  body.single .entry-content .agl-lead-box {
    padding: 20px 18px !important;
    border-radius: 16px !important;
    font-size: 15.5px !important;
  }

  body.page:not(.home) .entry-content h2,
  body.single .entry-content h2 {
    margin-top: 42px !important;
    padding: 18px 20px 18px 24px !important;
    border-radius: 16px !important;
    font-size: 20px !important;
    line-height: 1.45 !important;
  }

  body.page:not(.home) .entry-content h3,
  body.single .entry-content h3 {
    padding-left: 28px !important;
  }

  body.page:not(.home) .entry-content > ul,
  body.page:not(.home) .entry-content > ol,
  body.single .entry-content > ul,
  body.single .entry-content > ol {
    padding: 18px 18px 18px 38px !important;
    border-radius: 16px !important;
  }

  body.page:not(.home) .entry-content .agl-compare-box__grid,
  body.single .entry-content .agl-compare-box__grid {
    grid-template-columns: 1fr !important;
  }

  body.page:not(.home) .entry-content .toc,
  body.single .entry-content .toc {
    margin: 28px 0 38px !important;
    padding: 22px 22px !important;
    border-radius: 18px !important;
  }

  body.page:not(.home) .entry-content .toc-title,
  body.single .entry-content .toc-title {
    font-size: 16px !important;
  }

  body.page:not(.home) .entry-content .toc-list,
  body.single .entry-content .toc-list,
  body.page:not(.home) .entry-content .toc ol,
  body.single .entry-content .toc ol,
  body.page:not(.home) .entry-content .toc ul,
  body.single .entry-content .toc ul {
    padding-left: 26px !important;
  }
}

@media screen and (max-width: 480px) {
  body.page:not(.home) .entry-title,
  body.single .entry-title,
  body.category .archive-title,
  body.archive .archive-title,
  body.search .archive-title {
    padding-left: 17px !important;
    font-size: 24px !important;
    line-height: 1.42 !important;
  }

  body.page:not(.home) .entry-title::before,
  body.single .entry-title::before,
  body.category .archive-title::before,
  body.archive .archive-title::before,
  body.search .archive-title::before {
    width: 6px !important;
  }

  body.page:not(.home) .entry-content .agl-compare-box,
  body.single .entry-content .agl-compare-box {
    padding: 18px !important;
    border-radius: 18px !important;
  }

  body.page:not(.home) .entry-content .agl-compare-box__title,
  body.single .entry-content .agl-compare-box__title {
    font-size: 13px !important;
  }

  body.page:not(.home) .entry-content .agl-note,
  body.single .entry-content .agl-note,
  body.page:not(.home) .entry-content .agl-point-box,
  body.single .entry-content .agl-point-box {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* ==================================================
   AIガジェットラボ：下層ページ サイドバー共通デザイン
   対象：
   - PC通常サイドバー
   - Cocoon純正スマホサイドバー内
   - カスタムHTMLウィジェットの CATEGORY
   - ブロック検索
   - ブロック最近の投稿

   実HTML確認済み：
   CATEGORY は .widget_categories ではなく
   .widget_custom_html 内の .agl-side-category-list
================================================== */


/* ==================================================
   下層サイドバー：余白・共通
================================================== */

body.page:not(.home) .widget-sidebar,
body.single .widget-sidebar,
body.category .widget-sidebar,
body.archive .widget-sidebar,
body.search .widget-sidebar {
  margin-bottom: 36px !important;
}

body.page:not(.home) #sidebar,
body.page:not(.home) .sidebar,
body.single #sidebar,
body.single .sidebar,
body.category #sidebar,
body.category .sidebar,
body.archive #sidebar,
body.search #sidebar,
body.archive .sidebar,
body.search .sidebar {
  font-family:
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
  color: var(--agl-text);
}


/* ==================================================
   下層サイドバー：CATEGORY
   実HTML：
   .agl-sidebar-block
   .agl-sidebar-title
   .agl-side-category-list
================================================== */

body.page:not(.home) .agl-sidebar-block,
body.single .agl-sidebar-block,
body.category .agl-sidebar-block,
body.archive .agl-sidebar-block,
body.search .agl-sidebar-block {
  margin-bottom: 36px !important;
}

body.page:not(.home) .agl-sidebar-title,
body.single .agl-sidebar-title,
body.category .agl-sidebar-title,
body.archive .agl-sidebar-title,
body.search .agl-sidebar-title {
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--agl-text) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  font-style: italic !important;
  letter-spacing: 0.04em !important;
  line-height: 1.4 !important;
}

body.page:not(.home) .agl-side-category-list,
body.single .agl-side-category-list,
body.category .agl-side-category-list,
body.archive .agl-side-category-list,
body.search .agl-side-category-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page:not(.home) .agl-side-category-list li,
body.single .agl-side-category-list li,
body.category .agl-side-category-list li,
body.archive .agl-side-category-list li,
body.search .agl-side-category-list li {
  margin: 0 0 12px !important;
  padding: 0 !important;
  list-style: none !important;
}

body.page:not(.home) .agl-side-category-list li::before,
body.page:not(.home) .agl-side-category-list li::after,
body.single .agl-side-category-list li::before,
body.single .agl-side-category-list li::after,
body.category .agl-side-category-list li::before,
body.category .agl-side-category-list li::after,
body.archive .agl-side-category-list li::before,
body.search .agl-side-category-list li::before,
body.archive .agl-side-category-list li::after,
body.search .agl-side-category-list li::after {
  content: none !important;
  display: none !important;
}

body.page:not(.home) .agl-side-category-list a,
body.single .agl-side-category-list a,
body.category .agl-side-category-list a,
body.archive .agl-side-category-list a,
body.search .agl-side-category-list a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 52px !important;
  padding: 12px 18px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: var(--agl-text) !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease !important;
}

body.page:not(.home) .agl-side-category-list a:hover,
body.single .agl-side-category-list a:hover,
body.category .agl-side-category-list a:hover,
body.archive .agl-side-category-list a:hover,
body.search .agl-side-category-list a:hover {
  transform: translateY(4px) !important;
  color: var(--agl-text) !important;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.08),
    0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

body.page:not(.home) .agl-side-category-list a::after,
body.single .agl-side-category-list a::after,
body.category .agl-side-category-list a::after,
body.archive .agl-side-category-list a::after,
body.search .agl-side-category-list a::after {
  content: none !important;
  display: none !important;
}

body.page:not(.home) .agl-side-category-list i,
body.single .agl-side-category-list i,
body.category .agl-side-category-list i,
body.archive .agl-side-category-list i,
body.search .agl-side-category-list i {
  width: 24px !important;
  min-width: 24px !important;
  font-size: 20px !important;
  text-align: center !important;
  text-decoration: none !important;
}

body.page:not(.home) .agl-side-category-list span,
body.single .agl-side-category-list span,
body.category .agl-side-category-list span,
body.archive .agl-side-category-list span,
body.search .agl-side-category-list span {
  flex: 1 !important;
}


/* ==================================================
   下層サイドバー：検索ブロック
================================================== */

body.page:not(.home) .widget_search,
body.single .widget_search,
body.category .widget_search,
body.archive .widget_search,
body.search .widget_search {
  margin-bottom: 36px !important;
}

body.page:not(.home) .wp-block-search__label,
body.single .wp-block-search__label,
body.category .wp-block-search__label,
body.archive .wp-block-search__label,
body.search .wp-block-search__label {
  display: block !important;
  margin: 0 0 10px !important;
  color: var(--agl-text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
}

body.page:not(.home) .wp-block-search__inside-wrapper,
body.single .wp-block-search__inside-wrapper,
body.category .wp-block-search__inside-wrapper,
body.archive .wp-block-search__inside-wrapper,
body.search .wp-block-search__inside-wrapper {
  display: flex !important;
  gap: 10px !important;
}

body.page:not(.home) .wp-block-search__input,
body.single .wp-block-search__input,
body.category .wp-block-search__input,
body.archive .wp-block-search__input,
body.search .wp-block-search__input {
  min-height: 48px !important;
  border-radius: 10px !important;
  border: 1px solid #d1d5db !important;
  background: #f9fafb !important;
  color: var(--agl-text) !important;
  font-size: 16px !important;
}

body.page:not(.home) .wp-block-search__button,
body.single .wp-block-search__button,
body.category .wp-block-search__button,
body.archive .wp-block-search__button,
body.search .wp-block-search__button {
  min-height: 48px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  background: #2f3439 !important;
  color: #ffffff !important;
  border: 0 !important;
  font-weight: 800 !important;
}


/* ==================================================
   下層サイドバー：最近の投稿
================================================== */

body.page:not(.home) .widget_block .wp-block-heading,
body.single .widget_block .wp-block-heading,
body.category .widget_block .wp-block-heading,
body.archive .widget_block .wp-block-heading,
body.search .widget_block .wp-block-heading {
  margin: 0 0 20px !important;
  padding: 18px 22px !important;
  border-radius: 8px !important;
  background: #f5f6f7 !important;
  color: var(--agl-text) !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
}

body.page:not(.home) .wp-block-latest-posts,
body.single .wp-block-latest-posts,
body.category .wp-block-latest-posts,
body.archive .wp-block-latest-posts,
body.search .wp-block-latest-posts {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page:not(.home) .wp-block-latest-posts li,
body.single .wp-block-latest-posts li,
body.category .wp-block-latest-posts li,
body.archive .wp-block-latest-posts li,
body.search .wp-block-latest-posts li {
  margin: 0 0 14px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid #edf2f4 !important;
  list-style: none !important;
}

body.page:not(.home) .wp-block-latest-posts li::before,
body.page:not(.home) .wp-block-latest-posts li::after,
body.single .wp-block-latest-posts li::before,
body.single .wp-block-latest-posts li::after,
body.category .wp-block-latest-posts li::before,
body.category .wp-block-latest-posts li::after,
body.archive .wp-block-latest-posts li::before,
body.search .wp-block-latest-posts li::before,
body.archive .wp-block-latest-posts li::after,
body.search .wp-block-latest-posts li::after {
  content: none !important;
  display: none !important;
}

body.page:not(.home) .wp-block-latest-posts__post-title,
body.single .wp-block-latest-posts__post-title,
body.category .wp-block-latest-posts__post-title,
body.archive .wp-block-latest-posts__post-title,
body.search .wp-block-latest-posts__post-title {
  color: var(--agl-text) !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.7 !important;
}

body.page:not(.home) .wp-block-latest-posts__post-title:hover,
body.single .wp-block-latest-posts__post-title:hover,
body.category .wp-block-latest-posts__post-title:hover,
body.archive .wp-block-latest-posts__post-title:hover,
body.search .wp-block-latest-posts__post-title:hover {
  color: var(--agl-link-hover) !important;
}


/* ==================================================
   下層サイドバー：スマホ時のサイズ調整
================================================== */

@media screen and (max-width: 1023px) {
  body.page:not(.home) .agl-sidebar-title,
  body.single .agl-sidebar-title,
  body.category .agl-sidebar-title,
  body.archive .agl-sidebar-title,
  body.search .agl-sidebar-title {
    font-size: 20px !important;
  }

  body.page:not(.home) .agl-side-category-list a,
  body.single .agl-side-category-list a,
  body.category .agl-side-category-list a,
  body.archive .agl-side-category-list a,
  body.search .agl-side-category-list a {
    min-height: 50px !important;
    padding: 11px 15px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
  }

  body.page:not(.home) .widget_block .wp-block-heading,
  body.single .widget_block .wp-block-heading,
  body.category .widget_block .wp-block-heading,
  body.archive .widget_block .wp-block-heading,
  body.search .widget_block .wp-block-heading {
    font-size: 22px !important;
  }
}

/* ==================================================
   AIガジェットラボ：下層サイドバー CATEGORY アイコン色補正
   - .agl-side-category-list a の color 指定に負けないようにする
================================================== */

body.page:not(.home) .agl-side-category-list i.agl-icon-green,
body.single .agl-side-category-list i.agl-icon-green,
body.category .agl-side-category-list i.agl-icon-green,
body.archive .agl-side-category-list i.agl-icon-green,
body.search .agl-side-category-list i.agl-icon-green {
  color: var(--agl-green) !important;
}

body.page:not(.home) .agl-side-category-list i.agl-icon-purple,
body.single .agl-side-category-list i.agl-icon-purple,
body.category .agl-side-category-list i.agl-icon-purple,
body.archive .agl-side-category-list i.agl-icon-purple,
body.search .agl-side-category-list i.agl-icon-purple {
  color: var(--agl-purple) !important;
}

body.page:not(.home) .agl-side-category-list i.agl-icon-mint,
body.single .agl-side-category-list i.agl-icon-mint,
body.category .agl-side-category-list i.agl-icon-mint,
body.archive .agl-side-category-list i.agl-icon-mint,
body.search .agl-side-category-list i.agl-icon-mint {
  color: var(--agl-mint) !important;
}

body.page:not(.home) .agl-side-category-list i.agl-icon-orange,
body.single .agl-side-category-list i.agl-icon-orange,
body.category .agl-side-category-list i.agl-icon-orange,
body.archive .agl-side-category-list i.agl-icon-orange,
body.search .agl-side-category-list i.agl-icon-orange {
  color: var(--agl-orange) !important;
}

body.page:not(.home) .agl-side-category-list i.agl-icon-blue,
body.single .agl-side-category-list i.agl-icon-blue,
body.category .agl-side-category-list i.agl-icon-blue,
body.archive .agl-side-category-list i.agl-icon-blue,
body.search .agl-side-category-list i.agl-icon-blue {
  color: var(--agl-blue) !important;
}

body.page:not(.home) .agl-side-category-list i.agl-icon-yellow,
body.single .agl-side-category-list i.agl-icon-yellow,
body.category .agl-side-category-list i.agl-icon-yellow,
body.archive .agl-side-category-list i.agl-icon-yellow,
body.search .agl-side-category-list i.agl-icon-yellow {
  color: var(--agl-yellow) !important;
}

body.page:not(.home) .agl-side-category-list i.agl-icon-red,
body.single .agl-side-category-list i.agl-icon-red,
body.category .agl-side-category-list i.agl-icon-red,
body.archive .agl-side-category-list i.agl-icon-red,
body.search .agl-side-category-list i.agl-icon-red {
  color: var(--agl-red) !important;
}

/* ==================================================
   AIガジェットラボ：下層ページ 独自フッター
   - functions.php で出力する .agl-site-footer--lower 用
   - 下層ページでは Cocoon標準フッターを非表示
   - ホームには適用しない
================================================== */

/* 下層ページではCocoon標準フッターを非表示 */
body.page:not(.home) #footer,
body.page:not(.home) .footer,
body.single #footer,
body.single .footer,
body.category #footer,
body.category .footer,
body.archive #footer,
body.search #footer,
body.archive .footer,
body.search .footer {
  display: none !important;
}

/* 下層ページ独自フッター本体 */
body.page:not(.home) .agl-site-footer--lower,
body.single .agl-site-footer--lower,
body.category .agl-site-footer--lower,
body.archive .agl-site-footer--lower,
body.search .agl-site-footer--lower {
  position: relative !important;
  z-index: 0 !important;
  box-sizing: border-box !important;
  width: min(var(--agl-container, 1120px), calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  margin: 76px auto 34px !important;
  color: #063018;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__inner,
body.single .agl-site-footer--lower .agl-site-footer__inner,
body.category .agl-site-footer--lower .agl-site-footer__inner,
body.archive .agl-site-footer--lower .agl-site-footer__inner,
body.search .agl-site-footer--lower .agl-site-footer__inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.6fr);
  align-items: center;
  gap: 34px;
  width: 100% !important;
  padding: 30px 34px;
  background: var(--agl-card-bg);
  border-radius: var(--agl-radius-xl);
  box-shadow: var(--agl-shadow-floating);
  box-sizing: border-box !important;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__brand,
body.single .agl-site-footer--lower .agl-site-footer__brand,
body.category .agl-site-footer--lower .agl-site-footer__brand,
body.archive .agl-site-footer--lower .agl-site-footer__brand,
body.search .agl-site-footer--lower .agl-site-footer__brand,
body.page:not(.home) .agl-site-footer--lower .agl-site-footer__menu,
body.single .agl-site-footer--lower .agl-site-footer__menu,
body.category .agl-site-footer--lower .agl-site-footer__menu,
body.archive .agl-site-footer--lower .agl-site-footer__menu,
body.search .agl-site-footer--lower .agl-site-footer__menu {
  min-width: 0;
}

/* 下層フッターロゴ：PCヘッダーと同じ2段ロゴ */
body.page:not(.home) .agl-site-footer--lower .agl-site-footer__logo,
body.single .agl-site-footer--lower .agl-site-footer__logo,
body.category .agl-site-footer--lower .agl-site-footer__logo,
body.archive .agl-site-footer--lower .agl-site-footer__logo,
body.search .agl-site-footer--lower .agl-site-footer__logo {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 4px !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__logo::before,
body.single .agl-site-footer--lower .agl-site-footer__logo::before,
body.category .agl-site-footer--lower .agl-site-footer__logo::before,
body.archive .agl-site-footer--lower .agl-site-footer__logo::before,
body.search .agl-site-footer--lower .agl-site-footer__logo::before {
  content: "AI GADGET LAB";
  white-space: nowrap;
  display: block;
  font-family:
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
  font-size: 31px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 0.8;
  -webkit-text-stroke: 0.3px currentColor;
  color: transparent;
  background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__logo::after,
body.single .agl-site-footer--lower .agl-site-footer__logo::after,
body.category .agl-site-footer--lower .agl-site-footer__logo::after,
body.archive .agl-site-footer--lower .agl-site-footer__logo::after,
body.search .agl-site-footer--lower .agl-site-footer__logo::after {
  content: "AIガジェットラボ";
  display: block;
  margin-top: 0;
  font-family:
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
  font-size: 11px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: right;
  color: #6b7280;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__text,
body.single .agl-site-footer--lower .agl-site-footer__text,
body.category .agl-site-footer--lower .agl-site-footer__text,
body.archive .agl-site-footer--lower .agl-site-footer__text,
body.search .agl-site-footer--lower .agl-site-footer__text {
  margin: 12px 0 0;
  color: var(--agl-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

/* フッターナビ */
body.page:not(.home) .agl-site-footer--lower .agl-site-footer__nav,
body.single .agl-site-footer--lower .agl-site-footer__nav,
body.category .agl-site-footer--lower .agl-site-footer__nav,
body.archive .agl-site-footer--lower .agl-site-footer__nav,
body.search .agl-site-footer--lower .agl-site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__nav a,
body.single .agl-site-footer--lower .agl-site-footer__nav a,
body.category .agl-site-footer--lower .agl-site-footer__nav a,
body.archive .agl-site-footer--lower .agl-site-footer__nav a,
body.search .agl-site-footer--lower .agl-site-footer__nav a {
  color: #063018;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.16s ease;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__nav a:hover,
body.single .agl-site-footer--lower .agl-site-footer__nav a:hover,
body.category .agl-site-footer--lower .agl-site-footer__nav a:hover,
body.archive .agl-site-footer--lower .agl-site-footer__nav a:hover,
body.search .agl-site-footer--lower .agl-site-footer__nav a:hover {
  color: var(--agl-link-hover);
}

/* SNS */
body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns,
body.single .agl-site-footer--lower .agl-site-footer__sns,
body.category .agl-site-footer--lower .agl-site-footer__sns,
body.archive .agl-site-footer--lower .agl-site-footer__sns,
body.search .agl-site-footer--lower .agl-site-footer__sns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns-item,
body.single .agl-site-footer--lower .agl-site-footer__sns-item,
body.category .agl-site-footer--lower .agl-site-footer__sns-item,
body.archive .agl-site-footer--lower .agl-site-footer__sns-item,
body.search .agl-site-footer--lower .agl-site-footer__sns-item {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 17px;
  text-decoration: none;
  transition:
    color 0.16s ease,
    transform 0.16s ease;
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(1),
body.single .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(1),
body.category .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(1),
body.archive .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(1),
body.search .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(1) {
  color: var(--agl-sns-x);
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(2),
body.single .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(2),
body.category .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(2),
body.archive .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(2),
body.search .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(2) {
  color: var(--agl-sns-pinterest);
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(3),
body.single .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(3),
body.category .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(3),
body.archive .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(3),
body.search .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(3) {
  color: var(--agl-sns-video);
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns-item:hover,
body.single .agl-site-footer--lower .agl-site-footer__sns-item:hover,
body.category .agl-site-footer--lower .agl-site-footer__sns-item:hover,
body.archive .agl-site-footer--lower .agl-site-footer__sns-item:hover,
body.search .agl-site-footer--lower .agl-site-footer__sns-item:hover {
  transform: translateY(2px);
}

body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns-x,
body.single .agl-site-footer--lower .agl-site-footer__sns-x,
body.category .agl-site-footer--lower .agl-site-footer__sns-x,
body.archive .agl-site-footer--lower .agl-site-footer__sns-x,
body.search .agl-site-footer--lower .agl-site-footer__sns-x {
  display: inline-block;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* コピーライト */
body.page:not(.home) .agl-site-footer--lower .agl-site-footer__copy,
body.single .agl-site-footer--lower .agl-site-footer__copy,
body.category .agl-site-footer--lower .agl-site-footer__copy,
body.archive .agl-site-footer--lower .agl-site-footer__copy,
body.search .agl-site-footer--lower .agl-site-footer__copy {
  margin: 16px 0 0;
  color: rgba(107, 114, 128, 0.92);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* スマホ */
@media screen and (max-width: 1023px) {
  body.page:not(.home) .agl-site-footer--lower,
  body.single .agl-site-footer--lower,
  body.category .agl-site-footer--lower,
  body.archive .agl-site-footer--lower,
  body.search .agl-site-footer--lower {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    margin: 58px auto 104px !important;
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__inner,
  body.single .agl-site-footer--lower .agl-site-footer__inner,
  body.category .agl-site-footer--lower .agl-site-footer__inner,
  body.archive .agl-site-footer--lower .agl-site-footer__inner,
  body.search .agl-site-footer--lower .agl-site-footer__inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px 22px;
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__brand,
  body.single .agl-site-footer--lower .agl-site-footer__brand,
  body.category .agl-site-footer--lower .agl-site-footer__brand,
  body.archive .agl-site-footer--lower .agl-site-footer__brand,
  body.search .agl-site-footer--lower .agl-site-footer__brand,
  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__menu,
  body.single .agl-site-footer--lower .agl-site-footer__menu,
  body.category .agl-site-footer--lower .agl-site-footer__menu,
  body.archive .agl-site-footer--lower .agl-site-footer__menu,
  body.search .agl-site-footer--lower .agl-site-footer__menu {
    text-align: center;
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__logo,
  body.single .agl-site-footer--lower .agl-site-footer__logo,
  body.category .agl-site-footer--lower .agl-site-footer__logo,
  body.archive .agl-site-footer--lower .agl-site-footer__logo,
  body.search .agl-site-footer--lower .agl-site-footer__logo {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__nav,
  body.single .agl-site-footer--lower .agl-site-footer__nav,
  body.category .agl-site-footer--lower .agl-site-footer__nav,
  body.archive .agl-site-footer--lower .agl-site-footer__nav,
  body.search .agl-site-footer--lower .agl-site-footer__nav,
  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__sns,
  body.single .agl-site-footer--lower .agl-site-footer__sns,
  body.category .agl-site-footer--lower .agl-site-footer__sns,
  body.archive .agl-site-footer--lower .agl-site-footer__sns,
  body.search .agl-site-footer--lower .agl-site-footer__sns {
    justify-content: center;
  }
}

@media screen and (max-width: 480px) {
  body.page:not(.home) .agl-site-footer--lower,
  body.single .agl-site-footer--lower,
  body.category .agl-site-footer--lower,
  body.archive .agl-site-footer--lower,
  body.search .agl-site-footer--lower {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__nav,
  body.single .agl-site-footer--lower .agl-site-footer__nav,
  body.category .agl-site-footer--lower .agl-site-footer__nav,
  body.archive .agl-site-footer--lower .agl-site-footer__nav,
  body.search .agl-site-footer--lower .agl-site-footer__nav {
    gap: 10px 16px;
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__nav a,
  body.single .agl-site-footer--lower .agl-site-footer__nav a,
  body.category .agl-site-footer--lower .agl-site-footer__nav a,
  body.archive .agl-site-footer--lower .agl-site-footer__nav a,
  body.search .agl-site-footer--lower .agl-site-footer__nav a {
    font-size: 13px;
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__logo::before,
  body.single .agl-site-footer--lower .agl-site-footer__logo::before,
  body.category .agl-site-footer--lower .agl-site-footer__logo::before,
  body.archive .agl-site-footer--lower .agl-site-footer__logo::before,
  body.search .agl-site-footer--lower .agl-site-footer__logo::before {
    font-size: clamp(28px, 8vw, 34px);
  }

  body.page:not(.home) .agl-site-footer--lower .agl-site-footer__inner,
  body.single .agl-site-footer--lower .agl-site-footer__inner,
  body.category .agl-site-footer--lower .agl-site-footer__inner,
  body.archive .agl-site-footer--lower .agl-site-footer__inner,
  body.search .agl-site-footer--lower .agl-site-footer__inner {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* ==================================================
   AIガジェットラボ：投稿ページ スマホテーブル修正
   - 横スクロールは維持
   - セル内の文章が途中で切れないようにする
================================================== */

@media screen and (max-width: 640px) {

  body.single .entry-content .wp-block-table,
  body.single .entry-content .scrollable-table,
  body.single .entry-content .table-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.single .entry-content table {
    width: max-content !important;
    min-width: 640px !important;
    max-width: none !important;
    table-layout: auto !important;
  }

  body.single .entry-content table th,
  body.single .entry-content table td {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
    min-width: 120px !important;
  }

  body.single .entry-content table th:first-child,
  body.single .entry-content table td:first-child {
    min-width: 120px !important;
  }
}

/* ==================================================
   AIガジェットラボ：カテゴリーページ 記事一覧カード
   - 現在はCocoon標準カード表示を優先
   - 直前のPC崩れ対策として、entry-card系の独自指定は一旦撤去
   - 再設計時はカテゴリーページの実HTML確認後に追加
================================================== */

/* ==================================================
   AIガジェットラボ：カテゴリーページ 記事一覧 外枠のみ
   - Cocoon標準レイアウトは維持
   - 内部の display / grid / flex / 画像幅は触らない
================================================== */

body.category .entry-card-wrap,
body.archive .entry-card-wrap,
body.search .entry-card-wrap {
  display: block !important;
  margin: 0 0 28px !important;
  padding: 18px !important;
  border: 1px solid rgba(229, 231, 235, 0.95) !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.035),
    0 12px 26px rgba(15, 23, 42, 0.055) !important;
  overflow: hidden !important;
  text-decoration: none !important;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease !important;
}

body.category .entry-card-wrap:hover,
body.archive .entry-card-wrap:hover,
body.search .entry-card-wrap:hover {
  transform: translateY(3px) !important;
  border-color: rgba(57, 181, 74, 0.32) !important;
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.035),
    0 8px 20px rgba(15, 23, 42, 0.07) !important;
}

/* Cocoon標準カード内の余白だけ微調整 */
body.category .entry-card,
body.archive .entry-card,
body.search .entry-card {
  margin: 0 !important;
  background: transparent !important;
}

/* スマホは余白を少しだけ抑える */
@media screen and (max-width: 1023px) {
  body.category .entry-card-wrap,
  body.archive .entry-card-wrap,
  body.search .entry-card-wrap {
    margin: 0 0 22px !important;
    padding: 12px !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055) !important;
  }
}

/* ==================================================
   AIガジェットラボ：お問い合わせフォーム
   - Contact Form 7 用
   - .agl-contact-form 内だけに限定
   - 固定ページ本文デザインに合わせる
================================================== */

body.page:not(.home) .entry-content .agl-contact-form {
  margin: 34px 0 42px !important;
  padding: 30px 32px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07) !important;
}

body.page:not(.home) .entry-content .agl-contact-form__lead {
  margin: 0 0 24px !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(34, 211, 238, 0.28) !important;
  border-radius: 16px !important;
  background: #f0f9ff !important;
  color: #374151 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.9 !important;
}

body.page:not(.home) .entry-content .agl-contact-form__field {
  margin: 0 0 22px !important;
}

body.page:not(.home) .entry-content .agl-contact-form__field label {
  display: block !important;
  margin: 0 0 9px !important;
  color: #063018 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
}

body.page:not(.home) .entry-content .agl-contact-form__required {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 8px !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  background: #39b54a !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.04em !important;
}

body.page:not(.home) .entry-content .agl-contact-form input[type="text"],
body.page:not(.home) .entry-content .agl-contact-form input[type="email"],
body.page:not(.home) .entry-content .agl-contact-form input[type="url"],
body.page:not(.home) .entry-content .agl-contact-form input[type="tel"],
body.page:not(.home) .entry-content .agl-contact-form select,
body.page:not(.home) .entry-content .agl-contact-form textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 13px 15px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 14px !important;
  background: #f9fafb !important;
  color: #20262e !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.7 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease !important;
}

body.page:not(.home) .entry-content .agl-contact-form textarea {
  min-height: 190px !important;
  resize: vertical !important;
}

body.page:not(.home) .entry-content .agl-contact-form input[type="text"]:focus,
body.page:not(.home) .entry-content .agl-contact-form input[type="email"]:focus,
body.page:not(.home) .entry-content .agl-contact-form input[type="url"]:focus,
body.page:not(.home) .entry-content .agl-contact-form input[type="tel"]:focus,
body.page:not(.home) .entry-content .agl-contact-form select:focus,
body.page:not(.home) .entry-content .agl-contact-form textarea:focus {
  outline: none !important;
  border-color: #39b54a !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(57, 181, 74, 0.14) !important;
}

body.page:not(.home) .entry-content .agl-contact-form input::placeholder,
body.page:not(.home) .entry-content .agl-contact-form textarea::placeholder {
  color: #9ca3af !important;
  font-weight: 600 !important;
}

body.page:not(.home) .entry-content .agl-contact-form .wpcf7-form-control-wrap {
  display: block !important;
}

body.page:not(.home) .entry-content .agl-contact-form .wpcf7-not-valid-tip {
  margin-top: 7px !important;
  color: #ef4444 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
}

body.page:not(.home) .entry-content .agl-contact-form__privacy {
  margin: 26px 0 26px !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(57, 181, 74, 0.22) !important;
  border-radius: 16px !important;
  background: #f5fbf7 !important;
  color: #374151 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.8 !important;
}

body.page:not(.home) .entry-content .agl-contact-form__privacy .wpcf7-list-item {
  margin: 0 !important;
}

body.page:not(.home) .entry-content .agl-contact-form__privacy label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 0 !important;
  cursor: pointer !important;
}

body.page:not(.home) .entry-content .agl-contact-form__privacy input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  margin: 0.35em 0 0 !important;
  accent-color: #39b54a !important;
}

body.page:not(.home) .entry-content .agl-contact-form__privacy a {
  color: #063018 !important;
  font-weight: 900 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

body.page:not(.home) .entry-content .agl-contact-form__submit {
  margin: 28px 0 0 !important;
  text-align: center !important;
}

body.page:not(.home) .entry-content .agl-contact-form input[type="submit"],
body.page:not(.home) .entry-content .agl-contact-form .wpcf7-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 220px !important;
  min-height: 54px !important;
  padding: 0 34px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #063018 !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.16),
    0 14px 28px rgba(6, 48, 24, 0.18) !important;
  cursor: pointer !important;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease !important;
}

body.page:not(.home) .entry-content .agl-contact-form input[type="submit"]:hover,
body.page:not(.home) .entry-content .agl-contact-form .wpcf7-submit:hover {
  transform: translateY(3px) !important;
  background: #0b4a27 !important;
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.16),
    0 10px 22px rgba(6, 48, 24, 0.2) !important;
}

body.page:not(.home) .entry-content .agl-contact-form input[type="submit"]:disabled,
body.page:not(.home) .entry-content .agl-contact-form .wpcf7-submit:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

body.page:not(.home) .entry-content .agl-contact-form .wpcf7-spinner {
  margin-left: 12px !important;
}

/* Contact Form 7 メッセージ */
body.page:not(.home) .entry-content .agl-contact-form .wpcf7-response-output {
  margin: 26px 0 0 !important;
  padding: 16px 18px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.7 !important;
}

body.page:not(.home) .entry-content .agl-contact-form form.sent .wpcf7-response-output {
  border-color: rgba(57, 181, 74, 0.45) !important;
  background: #f0fdf4 !important;
  color: #063018 !important;
}

body.page:not(.home) .entry-content .agl-contact-form form.invalid .wpcf7-response-output,
body.page:not(.home) .entry-content .agl-contact-form form.unaccepted .wpcf7-response-output,
body.page:not(.home) .entry-content .agl-contact-form form.failed .wpcf7-response-output {
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: #fff7f7 !important;
  color: #991b1b !important;
}

/* スマホ調整 */
@media screen and (max-width: 640px) {
  body.page:not(.home) .entry-content .agl-contact-form {
    margin: 28px 0 38px !important;
    padding: 22px 18px !important;
    border-radius: 20px !important;
  }

  body.page:not(.home) .entry-content .agl-contact-form__lead {
    padding: 16px 16px !important;
    font-size: 15px !important;
  }

  body.page:not(.home) .entry-content .agl-contact-form input[type="text"],
  body.page:not(.home) .entry-content .agl-contact-form input[type="email"],
  body.page:not(.home) .entry-content .agl-contact-form input[type="url"],
  body.page:not(.home) .entry-content .agl-contact-form input[type="tel"],
  body.page:not(.home) .entry-content .agl-contact-form select,
  body.page:not(.home) .entry-content .agl-contact-form textarea {
    font-size: 16px !important;
    border-radius: 12px !important;
  }

  body.page:not(.home) .entry-content .agl-contact-form__privacy {
    padding: 16px !important;
    font-size: 14px !important;
  }

  body.page:not(.home) .entry-content .agl-contact-form input[type="submit"],
  body.page:not(.home) .entry-content .agl-contact-form .wpcf7-submit {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* ==================================================
   AIガジェットラボ：404ページ 下層デザイン適用
   - 404ページだけに適用
   - 既存の固定・投稿・カテゴリーページには影響させない
================================================== */

body.error404 {
  --agl-lower-header-bg: var(--agl-hero-bg);
  --agl-lower-header-card-bg: var(--agl-card-bg);
  --agl-lower-header-text: #063018;
  --agl-lower-header-hover: var(--agl-link-hover);
  --agl-lower-header-shadow: var(--agl-shadow-floating);
  background: var(--agl-bg);
}

/* Cocoon標準フッターを非表示 */
body.error404 #footer,
body.error404 .footer {
  display: none !important;
}


/* ==================================================
   404ページ：PCヘッダー
================================================== */

@media screen and (min-width: 1024px) {

  body.error404 #header-container,
  body.error404 .header-container {
    position: relative !important;
    z-index: 100 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 18px 0 20px !important;
    background: var(--agl-lower-header-bg) !important;
    box-shadow: none !important;
  }

  body.error404 .header-container-in {
    display: grid !important;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) !important;
    grid-template-areas: "brand nav" !important;
    align-items: center !important;
    gap: 32px !important;
    width: min(var(--agl-header-width), calc(100vw - 48px)) !important;
    max-width: var(--agl-header-width) !important;
    margin: 0 auto !important;
    padding: 17px 32px !important;
    background: var(--agl-lower-header-card-bg) !important;
    border-radius: var(--agl-radius-xl) !important;
    box-shadow: var(--agl-lower-header-shadow) !important;
    overflow: visible !important;
  }

  body.error404 #header,
  body.error404 .header,
  body.error404 .header-in,
  body.error404 .logo-header,
  body.error404 #navi,
  body.error404 .navi,
  body.error404 .navi-in {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  body.error404 #header,
  body.error404 .header {
    grid-area: brand !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.error404 .logo-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    line-height: 1 !important;
    transform: translateY(10px) !important;
  }

  body.error404 .tagline {
    display: none !important;
  }

  body.error404 .logo-header a,
  body.error404 .site-name-text {
    display: inline-flex !important;
    align-items: center !important;
    color: var(--agl-logo-text-color) !important;
    text-decoration: none !important;
    line-height: var(--agl-logo-line-height) !important;
  }

  body.error404 .site-name-text {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 4px !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }

  body.error404 .site-name-text::before {
    content: "AI GADGET LAB";
    white-space: nowrap;
    display: block;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: 31px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 0.8;
    -webkit-text-stroke: 0.3px currentColor;
    color: transparent;
    background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }

  body.error404 .site-name-text::after {
    content: "AIガジェットラボ";
    display: block;
    margin-top: 0;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: 11px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: right;
    color: #6b7280;
  }

  body.error404 #navi,
  body.error404 .navi {
    grid-area: nav !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.error404 .navi-in {
    display: flex !important;
    justify-content: flex-end !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.error404 .navi-in > ul {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: clamp(18px, 2.1vw, 30px) !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.error404 .navi-in > ul > li {
    position: relative !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.error404 .navi-in > ul > li > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 !important;
    color: var(--agl-lower-header-text) !important;
    background: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  body.error404 .navi-in > ul > li > a:hover {
    color: var(--agl-lower-header-hover) !important;
  }

  body.error404 .navi-in > ul > li:last-child {
    display: none !important;
  }
}


/* ==================================================
   404ページ：スマホヘッダー
================================================== */

@media screen and (max-width: 1023px) {

  body.error404 #header-container,
  body.error404 .header-container {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 14px 0 22px !important;
    background: var(--agl-lower-header-bg) !important;
    box-shadow: none !important;
  }

  body.error404 .header-container-in {
    width: calc(100vw - 28px) !important;
    max-width: 720px !important;
    margin: 0 auto !important;
    padding: 18px 18px 20px !important;
    background: var(--agl-lower-header-card-bg) !important;
    border-radius: 24px !important;
    box-shadow: var(--agl-lower-header-shadow) !important;
    box-sizing: border-box !important;
  }

  body.error404 #header,
  body.error404 .header,
  body.error404 .header-in,
  body.error404 .logo-header {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-align: center !important;
  }

  body.error404 .tagline {
    display: block !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    color: var(--agl-muted) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.7 !important;
    text-align: center !important;
  }

  body.error404 .logo-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 0 !important;
    line-height: 1 !important;
  }

  body.error404 .logo-header a,
  body.error404 .site-name-text {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--agl-logo-text-color) !important;
    text-decoration: none !important;
    line-height: 1 !important;
  }

  body.error404 .site-name-text {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    font-size: 0 !important;
  }

  body.error404 .site-name-text::before {
    content: "AI GADGET LAB";
    white-space: nowrap;
    display: block;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: clamp(26px, 8vw, 36px);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 0.9;
    -webkit-text-stroke: 0.25px currentColor;
    color: transparent;
    background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }

  body.error404 .site-name-text::after {
    content: "AIガジェットラボ";
    display: block;
    margin-top: 0;
    font-family:
      "Noto Sans JP",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
    font-size: 11px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.08em;
    line-height: 1;
    text-align: right;
    color: #6b7280;
  }

  body.error404 #navi,
  body.error404 .navi {
    display: none !important;
  }
}


/* ==================================================
   404ページ：サイドバー CATEGORY
================================================== */

body.error404 .agl-sidebar-title {
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--agl-text) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  font-style: italic !important;
  letter-spacing: 0.04em !important;
  line-height: 1.4 !important;
}

body.error404 .agl-side-category-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.error404 .agl-side-category-list li {
  margin: 0 0 12px !important;
  padding: 0 !important;
  list-style: none !important;
}

body.error404 .agl-side-category-list li::before,
body.error404 .agl-side-category-list li::after {
  content: none !important;
  display: none !important;
}

body.error404 .agl-side-category-list a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 52px !important;
  padding: 12px 18px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: var(--agl-text) !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

body.error404 .agl-side-category-list a:hover {
  transform: translateY(4px) !important;
  color: var(--agl-text) !important;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.08),
    0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

body.error404 .agl-side-category-list i {
  width: 24px !important;
  min-width: 24px !important;
  font-size: 20px !important;
  text-align: center !important;
}

body.error404 .agl-side-category-list span {
  flex: 1 !important;
}

body.error404 .agl-side-category-list i.agl-icon-green {
  color: var(--agl-green) !important;
}

body.error404 .agl-side-category-list i.agl-icon-purple {
  color: var(--agl-purple) !important;
}

body.error404 .agl-side-category-list i.agl-icon-mint {
  color: var(--agl-mint) !important;
}

body.error404 .agl-side-category-list i.agl-icon-orange {
  color: var(--agl-orange) !important;
}

body.error404 .agl-side-category-list i.agl-icon-blue {
  color: var(--agl-blue) !important;
}

body.error404 .agl-side-category-list i.agl-icon-yellow {
  color: var(--agl-yellow) !important;
}

body.error404 .agl-side-category-list i.agl-icon-red {
  color: var(--agl-red) !important;
}


/* ==================================================
   404ページ：下層独自フッター
================================================== */

body.error404 .agl-site-footer--lower {
  position: relative !important;
  z-index: 0 !important;
  box-sizing: border-box !important;
  width: min(var(--agl-container, 1120px), calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  margin: 76px auto 34px !important;
  color: #063018;
}

body.error404 .agl-site-footer--lower .agl-site-footer__inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.6fr);
  align-items: center;
  gap: 34px;
  width: 100% !important;
  padding: 30px 34px;
  background: var(--agl-card-bg);
  border-radius: var(--agl-radius-xl);
  box-shadow: var(--agl-shadow-floating);
  box-sizing: border-box !important;
}

body.error404 .agl-site-footer--lower .agl-site-footer__brand,
body.error404 .agl-site-footer--lower .agl-site-footer__menu {
  min-width: 0;
}

body.error404 .agl-site-footer--lower .agl-site-footer__logo {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 4px !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

body.error404 .agl-site-footer--lower .agl-site-footer__logo::before {
  content: "AI GADGET LAB";
  white-space: nowrap;
  display: block;
  font-family:
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
  font-size: 31px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 0.8;
  -webkit-text-stroke: 0.3px currentColor;
  color: transparent;
  background: linear-gradient(100deg, #1687ff 0%, #22d3ee 48%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body.error404 .agl-site-footer--lower .agl-site-footer__logo::after {
  content: "AIガジェットラボ";
  display: block;
  margin-top: 0;
  font-family:
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
  font-size: 11px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: right;
  color: #6b7280;
}

body.error404 .agl-site-footer--lower .agl-site-footer__text {
  margin: 12px 0 0;
  color: var(--agl-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

body.error404 .agl-site-footer--lower .agl-site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
}

body.error404 .agl-site-footer--lower .agl-site-footer__nav a {
  color: #063018;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}

body.error404 .agl-site-footer--lower .agl-site-footer__sns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

body.error404 .agl-site-footer--lower .agl-site-footer__sns-item {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 17px;
  text-decoration: none;
}

body.error404 .agl-site-footer--lower .agl-site-footer__sns-x {
  display: inline-block;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

body.error404 .agl-site-footer--lower .agl-site-footer__copy {
  margin: 16px 0 0;
  color: rgba(107, 114, 128, 0.92);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

@media screen and (max-width: 1023px) {
  body.error404 .agl-site-footer--lower {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    margin: 58px auto 104px !important;
  }

  body.error404 .agl-site-footer--lower .agl-site-footer__inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px 22px;
  }

  body.error404 .agl-site-footer--lower .agl-site-footer__brand,
  body.error404 .agl-site-footer--lower .agl-site-footer__menu {
    text-align: center;
  }

  body.error404 .agl-site-footer--lower .agl-site-footer__logo {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.error404 .agl-site-footer--lower .agl-site-footer__nav,
  body.error404 .agl-site-footer--lower .agl-site-footer__sns {
    justify-content: center;
  }
}

/* ==================================================
   AIガジェットラボ：404ページ フッターSNS色補正
================================================== */

body.error404 .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(1) {
  color: var(--agl-sns-x) !important;
}

body.error404 .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(2) {
  color: var(--agl-sns-pinterest) !important;
}

body.error404 .agl-site-footer--lower .agl-site-footer__sns-item:nth-child(3) {
  color: var(--agl-sns-video) !important;
}

body.error404 .agl-site-footer--lower .agl-site-footer__sns-item:hover {
  transform: translateY(2px);
}
