@charset "UTF-8";

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

/*
 * お得ラボ｜Cocoon子テーマ style.css
 * 2026-11-23 トップを含む全ページH2統一＋トップの詳細検索導線を見出しと区別できる青い楕円ボタンに変更。その他の構成を維持
 * 対応プラグイン：お得ラボ機能コア v0.3.22（プラグイン更新不要）
 * 機能コアが出力するカード・ページ送り・ランキング誘導のCSSはここに重複定義しません。
 */
:root {
  --otoku-green: #2d9365;
  --otoku-green-dark: #176a45;
  --otoku-green-light: #eff8f2;
  --otoku-border: #bdd9c7;
  --otoku-link: #08749b;
}

/* ==========================================
   1. トップ／固定／投稿／カテゴリ固定ページ共通
   H1：白背景・左緑線・細い緑枠
   ========================================== */
body.page .entry-title,
body.single-post .entry-title {
  margin: 0 0 6px !important;
  padding: 11px 14px !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border: 1px solid #b7dac5 !important;
  border-left: 5px solid var(--otoku-green) !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  color: #222 !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  text-shadow: none !important;
}

/* Cocoonのタイトル下部と本文開始位置をそろえる */
body.page .article-header,
body.single-post .article-header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.page .entry-content,
body.single-post .entry-content {
  margin-top: 12px !important;
}

/* 固定ページの古い投稿日・更新日表示は非表示。
   本文中の「更新日：...」やトップ独自の更新日表示には触れません。 */
body.page .article-header .date-tags,
body.page .article-header .post-date,
body.page .article-header .post-update {
  display: none !important;
}

/* 投稿記事の投稿日・更新日は残し、右揃えでコンパクトに表示 */
body.single-post .article-header .date-tags {
  margin: 4px 0 8px !important;
  padding: 0 !important;
  text-align: right !important;
  line-height: 1.4 !important;
}
body.single-post .article-header .post-date,
body.single-post .article-header .post-update {
  font-size: 12px !important;
  color: #68756e !important;
}

/* 直下の紹介文・補足文をコンパクトに。見出し・カード内は対象外 */
body.page .entry-content > p,
body.single-post .entry-content > p {
  margin-top: 0 !important;
  margin-bottom: 15px !important;
  line-height: 1.75 !important;
}

/* 編集画面で生じた空の段落を余白として残さない */
body.page .entry-content > p:empty,
body.single-post .entry-content > p:empty,
body.page .entry-content > p:has(> br:only-child),
body.single-post .entry-content > p:has(> br:only-child) {
  display: none !important;
}

/* トップの独自更新日（公開日とは別） */
body.home.page .otoku-latest-post-date {
  margin: 0 0 10px !important;
  color: #68756e !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  text-align: right !important;
}

/* トップの締切導線はクリック領域を維持しつつ上下を圧縮 */
body.home.page .otoku-top-today-cta {
  margin: 10px 0 10px !important;
}
body.home.page .otoku-top-today-cta a {
  padding: 11px 15px !important;
  gap: 12px !important;
  border-radius: 7px !important;
  box-shadow: 0 1px 4px rgba(80, 50, 30, .07) !important;
}
body.home.page .otoku-top-today-cta-label {
  font-size: 19px !important;
}
body.home.page .otoku-top-today-cta-note {
  margin-top: 2px !important;
}
/* 詳細検索：見出しと誤認しない青色の検索アクションボタン。
   H2の淡緑見出し・締切のオレンジ導線と色と輪郭を分離する。 */
body.home.page .otoku-top-search-cta {
  margin: 13px 0 19px !important;
  text-align: center !important;
}
body.home.page .otoku-top-search-cta a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-height: 44px !important;
  margin: 0 auto !important;
  padding: 9px 24px !important;
  border: 1px solid #07689a !important;
  border-radius: 999px !important;
  background: #087eaf !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: 0 2px 0 #075576, 0 4px 7px rgba(6, 61, 97, .11) !important;
  cursor: pointer !important;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
body.home.page .otoku-top-search-cta a::before {
  content: "🔎" !important;
  font-size: 17px !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
}
body.home.page .otoku-top-search-cta a:hover {
  transform: translateY(2px) !important;
  background: #076c9a !important;
  color: #fff !important;
  box-shadow: 0 1px 0 #064866, 0 2px 5px rgba(6, 61, 97, .10) !important;
  text-decoration: none !important;
}
body.home.page .otoku-top-search-cta a:focus-visible {
  outline: 3px solid #efb831 !important;
  outline-offset: 3px !important;
}

/* ==========================================
   2. 懸賞一覧の固定ページ専用
   ページ内に懸賞カードを含む固定ページを対象。
   トップページ・投稿ページ・カード本文・サイドバーには適用しない。
   ========================================== */

/* 懸賞一覧に自動表示されるCocoonの目次を消す。
   DOMは残るため、ページ本文の編集を伴わない表示調整。 */
body.page:not(.home) .entry-content:has(.otoku-tile-grid) .toc,
body.page:not(.home) .entry-content:has(.otoku-tile-grid) #toc,
body.page:not(.home) .entry-content:has(.otoku-tile-grid) .toc-wrap,
body.page:not(.home) .entry-content:has(.otoku-tile-grid) .ez-toc-container {
  display: none !important;
}

/* カテゴリー用固定ページに置かれた「更新日：...」ショートコード出力を
   非表示。記事の投稿日やトップページの日付には触れない。 */
body.page:not(.home) .entry-content:has(.otoku-tile-grid) .otoku-latest-post-date {
  display: none !important;
}

/* トップページを含む固定ページ、カテゴリー用固定ページ、投稿記事の本文直下のH2を統一。
   文字の太さ・高さ・左緑線・背景色をH1より控えめにする。
   サイドバー・懸賞タイル内・人気ランキング見出しには適用しない。 */
body.page .entry-content > h2,
body.single-post .entry-content > h2 {
  margin: 17px 0 14px !important;
  padding: 10px 13px !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-left: 5px solid var(--otoku-green) !important;
  border-radius: 3px !important;
  background: #edf8f1 !important;
  box-shadow: none !important;
  color: #20583e !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  text-shadow: none !important;
}
@media screen and (max-width: 480px) {
  body.page .entry-content > h2,
  body.single-post .entry-content > h2 {
    margin: 14px 0 12px !important;
    padding: 9px 11px !important;
    font-size: 18px !important;
  }
}

/* 3. サイドバー検索ガイド（CocoonのウィジェットHTML用） */
.otoku-side-guide { margin-bottom: 24px; }
.otoku-side-group { margin-bottom: 20px; }

.otoku-side-group h3 {
  margin: 0 0 10px !important;
  padding: 9px 12px !important;
  background: var(--otoku-green) !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  border: none !important;
  border-radius: 3px !important;
}

.otoku-side-wide { display: grid; gap: 8px; }
.otoku-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.otoku-side-guide a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 9px 7px !important;
  box-sizing: border-box;
  border: 1px solid #c8e0d2 !important;
  border-radius: 4px;
  background: #fff !important;
  color: var(--otoku-link) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  text-align: center;
  text-decoration: none !important;
}
.otoku-side-wide a {
  background: #f1f8f3 !important;
  font-size: 16px !important;
}
.otoku-side-guide a:hover {
  background: #e5f5eb !important;
  border-color: var(--otoku-green) !important;
  color: var(--otoku-green-dark) !important;
}

/* 3. トップ下部のWordPress Popular Posts（注目の懸賞TOP3） */
body.home .otoku-ranking-heading {
  margin: 16px 0 10px !important;
  padding: 10px 12px !important;
  background: #edf8f1 !important;
  border-left: 4px solid var(--otoku-green) !important;
  color: #243c30 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}
body.home .wpp-list {
  display: block !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  list-style: none !important;
}
body.home .wpp-list li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #e0ebe4 !important;
  list-style: none !important;
}
body.home .wpp-list li img {
  display: block !important;
  width: 120px !important;
  height: 120px !important;
  max-width: none !important;
  object-fit: cover !important;
  border-radius: 5px !important;
  margin: 0 !important;
}
body.home .wpp-list li a:has(> img) {
  flex: 0 0 120px !important;
}
body.home .otoku-wpp-text {
  flex: 1;
  min-width: 0;
}
body.home .wpp-list .wpp-post-title {
  color: #0064a4 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
}
body.home .wpp-list .wpp-post-title:hover {
  text-decoration: underline !important;
}
body.home .otoku-wpp-excerpt {
  margin: 5px 0 0 !important;
  color: #666 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
}

/* 4. スマートフォン */
@media screen and (max-width: 480px) {
  body.page .entry-title,
  body.single-post .entry-title {
    font-size: 20px !important;
    padding: 10px 12px !important;
  }
  body.page .entry-content,
  body.single-post .entry-content { margin-top: 9px !important; }
  body.page .entry-content > p,
  body.single-post .entry-content > p { margin-bottom: 13px !important; }
  body.home.page .otoku-latest-post-date { margin-bottom: 8px !important; }
  body.home.page .otoku-top-today-cta a { padding: 11px 12px !important; }
  body.home.page .otoku-top-today-cta-label { font-size: 18px !important; }
  body.home.page .otoku-top-search-cta { margin: 12px 0 17px !important; }
  body.home.page .otoku-top-search-cta a { width: fit-content !important; max-width: 100% !important; min-height: 42px !important; padding: 9px 16px !important; font-size: 14px !important; gap: 7px !important; }
  body.home.page .otoku-top-search-cta a::before { font-size: 16px !important; }
  body.home .wpp-list li img {
    width: 90px !important;
    height: 90px !important;
  }
  body.home .wpp-list li a:has(> img) {
    flex: 0 0 90px !important;
  }
  body.home .wpp-list .wpp-post-title {
    font-size: 16px !important;
  }
  body.home .otoku-wpp-excerpt {
    font-size: 13px !important;
  }
}
