/* =====================================================
   おうちじまい カスタムCSS
   メインカラー: #2c5364（ダークティール）
   アクセント: #e8c170（ゴールド）
   方向性: 落ち着いた・信頼感・温かみ
   ===================================================== */

/* =====================================================
   CSS変数定義
   ===================================================== */
:root {
  --color-main: #2c5364;
  --color-main-dark: #1e3a47;
  --color-main-light: #3d6b7e;
  --color-accent: #e8c170;
  --color-accent-dark: #c9a04f;
  --color-bg: #f9f7f4;
  --color-bg-card: #ffffff;
  --color-text: #3d3d3d;
  --color-text-light: #666666;
  --color-border: #e0d8cc;
  --color-border-light: #f0ebe3;
  --shadow-card: 0 2px 12px rgba(44, 83, 100, 0.10);
  --shadow-card-hover: 0 6px 24px rgba(44, 83, 100, 0.18);
  --radius-card: 10px;
  --radius-img: 8px;
  --font-base: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  --transition: 0.25s ease;
}

/* =====================================================
   ベース・全体設定
   ===================================================== */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

/* リンクカラー */
a {
  color: var(--color-main);
  transition: color var(--transition), opacity var(--transition);
}
a:hover {
  color: var(--color-main-dark);
  opacity: 0.85;
  text-decoration: none;
}

/* =====================================================
   ヘッダー
   ===================================================== */
#header {
  background: var(--color-main) !important;
  border-bottom: 3px solid var(--color-accent);
  padding: 0 !important;
}

#header .header-in {
  padding: 18px 24px;
}

/* サイトタイトル */
#site-title {
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}
#site-title a {
  color: #ffffff !important;
  text-decoration: none;
}
#site-title a:hover {
  opacity: 0.9;
  color: var(--color-accent) !important;
}

/* サイト説明文 */
#site-description {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

/* =====================================================
   グローバルナビゲーション
   ===================================================== */
#navi {
  background: var(--color-main-dark) !important;
}

#navi .navi-in > ul {
  display: flex;
  gap: 0;
}

#navi .navi-in > ul > li > a {
  color: rgba(255, 255, 255, 0.90) !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 14px 22px !important;
  display: block;
  position: relative;
  transition: color var(--transition), background var(--transition);
}

#navi .navi-in > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

#navi .navi-in > ul > li > a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

#navi .navi-in > ul > li > a:hover::after {
  width: 80%;
}

/* =====================================================
   ページ全体のコンテナ
   ===================================================== */
.content-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================
   エントリーカード（記事一覧カード）
   ===================================================== */
.entry-card,
.related-entry-card,
.large-entry-card {
  background: var(--color-bg-card) !important;
  border-radius: var(--radius-card) !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: var(--shadow-card) !important;
  transition: transform var(--transition), box-shadow var(--transition) !important;
  overflow: hidden;
}

.entry-card:hover,
.related-entry-card:hover,
.large-entry-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-card-hover) !important;
}

/* アイキャッチ画像の角丸 */
.entry-card-thumb img,
.related-entry-card-thumb img {
  border-radius: var(--radius-img) var(--radius-img) 0 0 !important;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* カードコンテンツ */
.entry-card-content,
.related-entry-card-content {
  padding: 16px !important;
}

/* カードタイトル */
.entry-card-title,
.related-entry-card-title {
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
  color: var(--color-text) !important;
  margin-bottom: 8px !important;
}

/* カテゴリラベル */
.entry-card .cat-label,
.related-entry-card .cat-label {
  background: var(--color-main) !important;
  color: #fff !important;
  border-radius: 3px !important;
  font-size: 0.7rem !important;
  padding: 2px 8px !important;
}

/* カード説明文 */
.entry-card-snippet {
  font-size: 0.8rem !important;
  color: var(--color-text-light) !important;
  line-height: 1.6 !important;
  margin-top: 6px !important;
}

/* =====================================================
   記事内 見出しデザイン
   ===================================================== */

/* h2: 左ボーダー＋下線（メインカラー） */
.entry-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 2.2em 0 1em;
  padding: 10px 16px 10px 20px;
  border-left: 5px solid var(--color-main);
  border-bottom: 2px solid var(--color-border);
  background: linear-gradient(to right, rgba(44, 83, 100, 0.05), transparent);
  line-height: 1.5;
}

/* h3: 左ボーダーのみ（アクセントカラー） */
.entry-content h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 1.8em 0 0.8em;
  padding: 6px 12px 6px 16px;
  border-left: 4px solid var(--color-accent);
  line-height: 1.5;
}

/* h4 */
.entry-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-main);
  margin: 1.5em 0 0.6em;
  padding-bottom: 4px;
  border-bottom: 1px dotted var(--color-border);
}

/* =====================================================
   記事本文
   ===================================================== */
.entry-content p {
  margin-bottom: 1.4em;
  line-height: 1.95;
}

.entry-content ul,
.entry-content ol {
  margin: 1em 0 1.4em 1.5em;
  line-height: 1.9;
}

.entry-content li {
  margin-bottom: 0.4em;
}

/* テーブル */
.entry-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.4em 0;
  font-size: 0.9rem;
}

.entry-content table th {
  background: var(--color-main) !important;
  color: #fff !important;
  padding: 10px 14px !important;
  font-weight: 600;
  text-align: left;
}

.entry-content table td {
  padding: 9px 14px !important;
  border: 1px solid var(--color-border) !important;
  vertical-align: top;
}

.entry-content table tr:nth-child(even) td {
  background: rgba(44, 83, 100, 0.04) !important;
}

/* =====================================================
   サイドバー
   ===================================================== */
#sidebar {
  padding-left: 24px;
}

/* ウィジェット全体 */
.widget {
  margin-bottom: 28px !important;
  background: #fff !important;
  border-radius: 10px !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: 0 2px 8px rgba(44, 83, 100, 0.07) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

/* ウィジェットタイトル */
.widget_title,
.widget-title,
h2.widget-title {
  background: var(--color-main) !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  padding: 10px 16px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
}

/* ウィジェット内のリスト */
.widget ul {
  padding: 12px 16px !important;
  margin: 0 !important;
}

.widget ul li {
  padding: 5px 0 !important;
  border-bottom: 1px solid var(--color-border-light) !important;
  font-size: 0.86rem !important;
  list-style: none !important;
}

.widget ul li:last-child {
  border-bottom: none !important;
}

.widget ul li a {
  color: var(--color-text) !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget ul li a:hover {
  color: var(--color-main) !important;
}

/* カテゴリーウィジェット件数 */
.widget ul li .widget-cat-count {
  color: var(--color-text-light);
  font-size: 0.78rem;
}

/* =====================================================
   プロフィールボックス（サイドバー）
   ===================================================== */
.author-box,
.author-widget-box {
  text-align: center;
  padding: 20px 16px !important;
}

.author-box .author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--color-accent);
  object-fit: cover;
}

.author-box .author-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 10px 0 6px;
  color: var(--color-text);
}

.author-box .author-description {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.7;
  text-align: left;
}

/* =====================================================
   フッター
   ===================================================== */
#footer {
  background: var(--color-main-dark) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 40px 0 0 !important;
  margin-top: 60px;
}

#footer a {
  color: rgba(255, 255, 255, 0.75) !important;
}
#footer a:hover {
  color: var(--color-accent) !important;
}

.footer-left, .footer-center, .footer-right {
  padding: 0 20px 30px !important;
}

.footer-left .widget_title,
.footer-center .widget_title,
.footer-right .widget_title {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.1em;
}

.footer-left .widget ul li,
.footer-center .widget ul li,
.footer-right .widget ul li {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  font-size: 0.82rem !important;
}

.footer-left .widget ul li a,
.footer-center .widget ul li a,
.footer-right .widget ul li a {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* フッターコピーライト */
#copyright {
  background: rgba(0, 0, 0, 0.25) !important;
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 0.78rem !important;
  text-align: center !important;
  padding: 14px 20px !important;
  margin-top: 0 !important;
}

/* =====================================================
   記事タイトル（個別記事ページ）
   ===================================================== */
.entry-title {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  color: var(--color-text) !important;
  margin-bottom: 20px !important;
  padding-bottom: 16px !important;
  border-bottom: 2px solid var(--color-border) !important;
}

/* パンくずリスト */
.breadcrumb {
  font-size: 0.78rem !important;
  color: var(--color-text-light) !important;
  padding: 10px 0 !important;
}

/* 投稿日・更新日 */
.post-date,
.post-updated {
  color: var(--color-text-light) !important;
  font-size: 0.8rem !important;
}

/* =====================================================
   Cocoon ボックス（memo_box / yellow_box / red_box）
   ===================================================== */

/* メモボックス */
.memo-box {
  border-color: var(--color-main) !important;
  border-left-width: 4px !important;
}

.memo-box .box-title {
  background: var(--color-main) !important;
  color: #fff !important;
}

/* 黄色ボックス */
.yellow-box {
  border-color: var(--color-accent) !important;
  background: rgba(232, 193, 112, 0.08) !important;
}

.yellow-box .box-title {
  background: var(--color-accent) !important;
  color: var(--color-text) !important;
}

/* 赤（警告）ボックス */
.red-box {
  border-color: #c0392b !important;
}

.red-box .box-title {
  background: #c0392b !important;
  color: #fff !important;
}

/* =====================================================
   CTA（アフィリエイトボタン）
   ===================================================== */
.btn-wrap a,
.wp-block-button__link {
  background: var(--color-accent) !important;
  color: var(--color-main-dark) !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  padding: 12px 28px !important;
  transition: background var(--transition), transform var(--transition) !important;
  box-shadow: 0 3px 10px rgba(232, 193, 112, 0.4) !important;
  text-decoration: none !important;
  display: inline-block !important;
}

.btn-wrap a:hover,
.wp-block-button__link:hover {
  background: var(--color-accent-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 16px rgba(232, 193, 112, 0.5) !important;
}

/* =====================================================
   目次（TOC）
   ===================================================== */
#toc_container,
.toc-box {
  background: rgba(44, 83, 100, 0.04) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 8px !important;
  padding: 20px 24px !important;
  margin: 1.8em 0 !important;
}

.toc-box .toc-title {
  color: var(--color-main) !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  margin-bottom: 10px !important;
}

/* =====================================================
   ページネーション
   ===================================================== */
.pagination .current {
  background: var(--color-main) !important;
  color: #fff !important;
  border-radius: 4px !important;
}

.pagination a {
  color: var(--color-main) !important;
  border-radius: 4px !important;
  transition: background var(--transition) !important;
}

.pagination a:hover {
  background: rgba(44, 83, 100, 0.12) !important;
}

/* =====================================================
   インデックスページ（記事一覧）
   ===================================================== */
.index-tab-buttons .index-tab-button {
  background: transparent !important;
  color: var(--color-main) !important;
  border: 2px solid var(--color-main) !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  transition: all var(--transition) !important;
}

.index-tab-buttons .index-tab-button.selected,
.index-tab-buttons .index-tab-button:hover {
  background: var(--color-main) !important;
  color: #fff !important;
}

/* =====================================================
   関連記事セクション
   ===================================================== */
.related-entries .related-entry-heading {
  color: var(--color-main) !important;
  border-bottom: 2px solid var(--color-main) !important;
  padding-bottom: 8px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}

/* =====================================================
   モバイル対応
   ===================================================== */
@media (max-width: 834px) {
  body {
    font-size: 15px;
  }

  .entry-title {
    font-size: 1.25rem !important;
  }

  .entry-content h2 {
    font-size: 1.15rem;
    padding: 8px 12px 8px 16px;
  }

  .entry-content h3 {
    font-size: 1rem;
  }

  #sidebar {
    padding-left: 0;
    margin-top: 32px;
  }

  .entry-card-thumb img {
    height: 160px;
  }
}

/* =====================================================
   フロントページ専用スタイル
   ===================================================== */

/* ヒーローエリア */
.front-hero {
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-light) 60%, #4a8fa8 100%);
  color: #fff;
  text-align: center;
  padding: 56px 24px 52px;
  position: relative;
  overflow: hidden;
}

.front-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: rgba(232, 193, 112, 0.07);
  transform: rotate(15deg);
  pointer-events: none;
}

.front-hero-catch {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.front-hero-catch .accent {
  color: var(--color-accent);
}

.front-hero-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.8;
}

.front-hero-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.front-hero-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  font-size: 0.78rem;
  padding: 5px 14px;
}

/* カテゴリセクション */
.front-category-section {
  padding: 48px 0 40px;
}

.front-category-section:nth-child(even) {
  background: rgba(44, 83, 100, 0.03);
}

.front-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}

.front-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.front-section-title .section-icon {
  width: 28px;
  height: 28px;
  background: var(--color-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.front-more-link {
  font-size: 0.82rem;
  color: var(--color-main) !important;
  border: 1px solid var(--color-main);
  border-radius: 4px;
  padding: 5px 14px;
  white-space: nowrap;
  transition: all var(--transition);
}

.front-more-link:hover {
  background: var(--color-main);
  color: #fff !important;
}

/* カテゴリカードグリッド */
.front-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.front-card {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition));
  text-decoration: none !important;
  color: var(--color-text) !important;
  display: block;
}

.front-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  color: var(--color-text) !important;
}

.front-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.front-card-img-placeholder {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
}

.front-card-body {
  padding: 14px 14px 16px;
}

.front-card-title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* モバイルでのフロントページ */
@media (max-width: 834px) {
  .front-hero {
    padding: 40px 20px 36px;
  }
  .front-hero-catch {
    font-size: 1.35rem;
  }
  .front-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .front-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .front-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .front-card-img,
  .front-card-img-placeholder {
    height: 120px;
  }
}

/* ===== トップページ（固定ページID:176）不要要素の非表示 ===== */
.post-176 .entry-title,
#post-176 .entry-title {
  display: none !important;
}
.post-176 .toc,
#post-176 .toc,
.post-176 .toc-content,
#post-176 .toc-content {
  display: none !important;
}
.post-176 .sns-share,
#post-176 .sns-share {
  display: none !important;
}
.post-176 .date-tags,
#post-176 .date-tags {
  display: none !important;
}
/* ===== サイト全体：SNSシェア・フォローボタン非表示 ===== */
.sns-share,
.sns-follow {
  display: none !important;
}
/* ===== 更新日を非表示（公開日のみ表示） ===== */
.post-update {
  display: none !important;
}
/* ===== 記事ページのアイキャッチ上カテゴリバッジを非表示 ===== */
.article .eye-catch .cat-label,
.article .eye-catch .category-label,
.single .eye-catch .cat-label,
.single .eye-catch .category-label {
  display: none !important;
}
/* ===== トップページ: フロントページコンテンツのパディング調整 ===== */
#post-176 .entry-content {
  padding: 0 !important;
}

/* ===== WP自動挿入のBRタグをグリッド内で非表示 ===== */
.fp-sim-grid br,
.fp-cat-grid br {
  display: none !important;
}

/* ===== トップページ: article-footer・JSON-LD余白を非表示 ===== */
.home .article-footer { display: none !important; }
.home .entry-content p:has(> script) { display: none !important; }
.home .entry-content { margin-bottom: 8px !important; }
.home #main { padding-bottom: 20px !important; }
/* ===== トップページ: 上部スペース修正 ===== */
.home #main { padding-top: 0 !important; }
.home .article { margin-top: 0 !important; padding-top: 0 !important; }
.home .entry-content > div:first-child { margin-top: 0 !important; }
/* ===== フッター幅修正 ===== */
#footer {
  width: 1256px !important;
  max-width: none !important;
  margin-left: -178px !important;
  box-sizing: border-box !important;
}
/* ===== ナビゲーション: 全幅対応修正 ===== */
#navi-in.wrap { width: 100% !important; max-width: 900px !important; margin-left: auto !important; margin-right: auto !important; }
/* ===== フッターウィジェット: 白背景を透明化（白文字が見えるように） ===== */
#footer .widget { background: transparent !important; border: none !important; box-shadow: none !important; }
/* ===== ヘッダー: 右側切れ修正（フッターと同じ方式） ===== */
#header {
  width: 1256px !important;
  max-width: none !important;
  margin-left: -178px !important;
  box-sizing: border-box !important;
}
/* ===== メインコンテンツ: 幅を900pxに固定（右ずれ修正） ===== */
.home #main {
  width: 900px !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}
/* ===== フッター: カテゴリ列を非表示 ===== */
#footer .footer-left { display: none !important; }
#footer .footer-widgets { display: flex !important; }
#footer .footer-center { flex: 2 !important; width: auto !important; }
#footer .footer-right { flex: 1 !important; width: auto !important; }
/* ===== ナビをヘッダー幅(1256px)に合わせる ===== */
#navi { width: 100% !important; }
/* ===== 本文中の運営者情報・サイトマップを非表示（フッターへ移動のため） ===== */
.home .site-footer-nav { display: none !important; }
/* ===== フッターカラムバランス調整（2カラム均等） ===== */
#footer .footer-center { flex: 1 !important; width: auto !important; }
#footer .footer-right { flex: 1 !important; width: auto !important; padding-left: 24px !important; }
/* ===== ナビ幅を1256pxに明示指定（ヘッダーと合わせる） ===== */
#navi { width: 1256px !important; margin-left: -178px !important; box-sizing: border-box !important; }

/* ===== フッター: バランス改善 ===== */
/* 左列を絞り、右列を広げる */
#footer .footer-widgets { align-items: flex-start !important; gap: 0 !important; }
#footer .footer-center { flex: 0 0 40% !important; max-width: 40% !important; width: 40% !important; }
#footer .footer-right { flex: 0 0 57% !important; max-width: 57% !important; width: 57% !important; padding-left: 40px !important; }

/* 右列リンクを2カラムグリッドに変更 */
#footer .footer-right ul.wp-block-list {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 16px 0 0 !important;
  list-style: none !important;
}
#footer .footer-right ul.wp-block-list li {
  border-top: 1px solid rgba(255,255,255,0.12) !important;
  border-bottom: none !important;
  padding: 10px 4px !important;
  margin: 0 !important;
}
#footer .footer-right ul.wp-block-list li a {
  color: rgba(255,255,255,0.75) !important;
  text-decoration: none !important;
  font-size: 0.9em !important;
}
#footer .footer-right ul.wp-block-list li a:hover {
  color: #fff !important;
}

/* フッターボトム非表示（ウィジェットに同内容あり） */
.footer-bottom { display: none !important; }

/* ===== ヘッダー・ナビ・フッター: 全幅対応（全ページ共通・固定幅を上書き） ===== */
#header, #navi, #footer {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  box-sizing: border-box !important;
}

/* ===== 内部ページ: サイドバーを横並びに修正（content-in幅拡大） ===== */
#content-in {
  max-width: 1300px !important;
  width: 100% !important;
}

/* ===== トップページ: Yahoo!ニュース型レイアウト ===== */
#oc-top { max-width: 100%; }
.oc-section { margin-bottom: 48px; }
.oc-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 10px;
  border-bottom: 3px solid #2c5f5f;
}
.oc-section-title { font-size: 1.15em; font-weight: bold; color: #2c5f5f; margin: 0; }
.oc-section-sub { font-size: 0.82em; color: #888; margin-left: 12px; }
.oc-loading { padding: 20px; color: #999; text-align: center; }

/* シミュレーター */
.oc-sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.oc-sim-card {
  display: flex; align-items: center; justify-content: center;
  padding: 22px 16px; border-radius: 10px; text-decoration: none !important;
  font-weight: bold; font-size: 1em; color: #fff !important;
  text-align: center; line-height: 1.5;
  transition: opacity .2s, transform .2s;
}
.oc-sim-card:hover { opacity: .88; transform: translateY(-2px); }
.oc-sim-butsudan  { background: linear-gradient(135deg,#7B4B2A,#A06840); }
.oc-sim-hakajimai { background: linear-gradient(135deg,#3E5E3E,#5A7E5A); }
.oc-sim-ihin      { background: linear-gradient(135deg,#3A4E6E,#556A8E); }
.oc-sim-kataduke  { background: linear-gradient(135deg,#7A5A1A,#9A7A3A); }

/* 最新記事カードグリッド */
.oc-card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.oc-article-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,.09);
  transition: box-shadow .2s, transform .2s;
}
.oc-article-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.15); transform: translateY(-3px); }
.oc-article-card a { text-decoration: none !important; color: inherit; display: block; }
.oc-card-thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #e8e8e8; }
.oc-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-no-thumb { width: 100%; height: 100%; background: linear-gradient(135deg,#dde8e8,#c8d8d8); }
.oc-card-body { padding: 12px 14px 14px; }
.oc-card-cat {
  display: inline-block; font-size: .7em; padding: 2px 8px;
  border-radius: 4px; margin-bottom: 6px; color: #fff !important; font-weight: bold;
}
.oc-card-title {
  font-size: .88em; font-weight: bold; line-height: 1.55; color: #222;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.oc-badge-2 { background: #7B4B2A; }
.oc-badge-7 { background: #3E5E3E; }
.oc-badge-9 { background: #3A4E6E; }
.oc-badge-8 { background: #7A5A1A; }

/* カテゴリ別 2×2グリッド */
.oc-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.oc-cat-box {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,.08); border: 1px solid #ebebeb;
}
.oc-cat-box-header { padding: 13px 16px; font-weight: bold; font-size: 1em; color: #fff !important; }
.oc-cat-box-list a {
  display: block; padding: 9px 16px; font-size: .87em; color: #333 !important;
  text-decoration: none !important; border-bottom: 1px solid #f0f0f0; line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oc-cat-box-list a:last-child { border-bottom: none; }
.oc-cat-box-list a:hover { background: #f5f8f5; color: #2c5f5f !important; }
.oc-cat-box-list a::before { content: '\25B6  '; font-size: .65em; color: #aaa; }
.oc-cat-box-footer {
  padding: 10px 16px; text-align: right;
  border-top: 1px solid #ebebeb; background: #fafafa;
}
.oc-cat-box-footer a { font-size: .85em; color: #2c5f5f !important; text-decoration: none !important; font-weight: bold; }
.oc-cat-box-footer a:hover { text-decoration: underline !important; }
.oc-cat-butsudan  { background: linear-gradient(135deg,#7B4B2A,#A06840); }
.oc-cat-hakajimai { background: linear-gradient(135deg,#3E5E3E,#5A7E5A); }
.oc-cat-ihin      { background: linear-gradient(135deg,#3A4E6E,#556A8E); }
.oc-cat-kataduke  { background: linear-gradient(135deg,#7A5A1A,#9A7A3A); }

/* レスポンシブ */
@media (max-width: 640px) {
  .oc-card-grid { grid-template-columns: repeat(2,1fr); }
  .oc-cat-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .oc-sim-grid  { grid-template-columns: 1fr; }
  .oc-card-grid { grid-template-columns: 1fr; }
}

/* ===== PC: 右下フローティングCTA ===== */
.oc-float-cta {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end;
}
.oc-float-btn {
  width: 68px; height: 68px; border-radius: 50%;
  background: #2c5f5f; color: #fff; border: none; cursor: pointer;
  font-size: 0.72em; font-weight: bold; line-height: 1.3; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.oc-float-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.oc-float-arrow { font-size: 0.8em; opacity: .8; }
.oc-float-menu {
  display: none; flex-direction: column; margin-bottom: 12px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18); overflow: hidden; min-width: 220px;
}
.oc-float-menu.oc-float-menu-open { display: flex; }
.oc-float-menu-title {
  padding: 10px 16px; font-size: .8em; font-weight: bold;
  color: #2c5f5f; border-bottom: 1px solid #eee; background: #f8fbfb;
}
.oc-float-item {
  display: block; padding: 11px 16px; font-size: .88em; font-weight: bold;
  color: #fff !important; text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: opacity .15s;
}
.oc-float-item:last-child { border-bottom: none; }
.oc-float-item:hover { opacity: .88; }

/* ===== SP: 画面下部固定バー ===== */
.oc-sp-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  flex-direction: column-reverse;
}
.oc-sp-bar-btn {
  width: 100%; padding: 15px; background: #2c5f5f; color: #fff;
  border: none; cursor: pointer; font-size: 1em; font-weight: bold;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}
.oc-sp-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease; background: #fff;
}
.oc-sp-panel.oc-sp-panel-open { max-height: 280px; }
.oc-sp-panel-inner { padding: 8px 0; border-top: 1px solid #eee; }
.oc-sp-item {
  display: block; padding: 13px 24px; font-size: .95em; font-weight: bold;
  color: #fff !important; text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: opacity .15s;
}
.oc-sp-item:last-child { border-bottom: none; }
.oc-sp-item:hover { opacity: .9; }

/* PC/SPの出し分け */
@media (max-width: 768px) {
  .oc-float-cta { display: none !important; }
  .oc-sp-bar { display: flex !important; }
  #oc-top { padding-bottom: 60px; }
}
@media (min-width: 769px) {
  .oc-sp-bar { display: none !important; }
}

/* ===== SP: ヘッダーをコンパクトに ===== */
@media (max-width: 768px) {
  #header-in { padding: 8px 16px !important; }
  .site-name a { font-size: 1.05em !important; }
  .site-description { display: none !important; }
  #header { min-height: 0 !important; }
}

/* ===== SP: Yahoo!ニュース風コンパクトレイアウト ===== */
@media (max-width: 768px) {

  /* 最新記事：縦カード→横並び小カードに変更 */
  .oc-card-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .oc-article-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    border-bottom: 1px solid #efefef !important;
    transform: none !important;
  }
  .oc-article-card:hover {
    box-shadow: none !important;
    transform: none !important;
  }
  .oc-article-card a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
  }
  .oc-card-thumb {
    width: 96px !important;
    min-width: 96px !important;
    height: 68px !important;
    aspect-ratio: unset !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }
  .oc-card-body {
    padding: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .oc-card-cat {
    font-size: 0.65em !important;
    padding: 1px 6px !important;
    margin-bottom: 4px !important;
  }
  .oc-card-title {
    font-size: 0.88em !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.45 !important;
  }

  /* シミュレーター：SPでも2列キープ・高さ縮小 */
  .oc-sim-card {
    padding: 14px 10px !important;
    font-size: 0.88em !important;
  }

  /* セクションヘッダーをコンパクトに */
  .oc-section { margin-bottom: 28px !important; }
  .oc-section-header { margin-bottom: 12px !important; padding-bottom: 8px !important; }
  .oc-section-title { font-size: 1em !important; }
  .oc-section-sub { display: none !important; }

  /* カテゴリ別：1列に */
  .oc-cat-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
}

/* ===== SP: Yahoo風ヘッダー・ナビ大改修 ===== */
@media (max-width: 768px) {
  /* ヘッダー: taglineを非表示、ロゴをコンパクトに */
  .tagline { display: none !important; }
  #header-in {
    padding: 0 12px !important;
    flex-direction: row !important;
    align-items: center !important;
    min-height: 48px !important;
    height: 48px !important;
  }
  .logo.logo-header {
    padding: 0 !important; margin: 0 !important;
    display: flex !important; align-items: center !important;
  }
  .site-name {
    font-size: 1.15em !important;
    line-height: 1 !important;
    padding: 0 !important; margin: 0 !important;
  }
  .site-name a { padding: 0 !important; }
  #header { min-height: 0 !important; }

  /* ナビ: 非表示（ハンバーガーメニューで代替） */
  #navi { display: none !important; }

  /* シミュレーター: 強制2列＋コンパクト */
  .oc-sim-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .oc-sim-full { display: none !important; }
  .oc-sim-short {
    display: block !important;
    font-size: 0.82em !important;
    line-height: 1.4 !important;
  }
  .oc-sim-card { padding: 14px 8px !important; }
}
@media (min-width: 769px) {
  .oc-sim-short { display: none !important; }
  .oc-sim-full { display: block !important; }
}

/* ===== SP: コンテンツ横幅いっぱい & SPバー余白 (v3) ===== */
@media (max-width: 768px) {
  .home #main { overflow: visible !important; padding-bottom: 70px !important; }
  #oc-top {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
  }
  .oc-section { padding: 20px 16px !important; }
  .oc-section-header { padding: 0 !important; }
}

/* ===== よくある悩みセクション ===== */
.oc-worry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.oc-worry-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #f8f9fa;
  border-left: 4px solid #ccc;
}
.oc-worry-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.oc-worry-q {
  font-size: 1.4em;
  font-weight: 900;
  line-height: 1.2;
  flex-shrink: 0;
}
.oc-worry-text {
  font-size: 0.88em;
  line-height: 1.55;
  color: #333 !important;
  font-weight: 600;
}
.oc-worry-butsudan  { border-left-color: #7B4B2A; }
.oc-worry-butsudan  .oc-worry-q { color: #7B4B2A; }
.oc-worry-hakajimai { border-left-color: #3E5E3E; }
.oc-worry-hakajimai .oc-worry-q { color: #3E5E3E; }
.oc-worry-ihin      { border-left-color: #3A4E6E; }
.oc-worry-ihin      .oc-worry-q { color: #3A4E6E; }
.oc-worry-kataduke  { border-left-color: #7A5A1A; }
.oc-worry-kataduke  .oc-worry-q { color: #7A5A1A; }
@media (max-width: 768px) {
  .oc-worry-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .oc-worry-card { padding: 12px 10px; gap: 8px; }
  .oc-worry-text { font-size: 0.8em; }
  .oc-worry-q { font-size: 1.2em; }
}

/* ===== SP: 記事ページ横幅いっぱい ===== */
@media (max-width: 768px) {
  .single #main,
  .page:not(.home) #main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ===== よくある悩み: テキストタグ (v3) ===== */
.oc-worry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.oc-worry-tag {
  display: inline-block;
  padding: 7px 14px;
  background: #f2f2f2;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.875em;
  color: #333 !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: background 0.15s;
  line-height: 1.4;
}
.oc-worry-tag:hover { background: #e5e5e5 !important; color: #111 !important; }

/* ===== セクション間隔を詰める ===== */
.oc-section { margin-bottom: 24px !important; }

/* ===== SP: グロナビ横スクロール表示 ===== */
@media (max-width: 768px) {
  #navi {
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
    overflow: hidden !important;
  }
  #navi-in {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #navi-in::-webkit-scrollbar { display: none; }
  #navi-in .menu-top {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  #navi-in .menu-item {
    flex-shrink: 0 !important;
    border-right: 1px solid rgba(255,255,255,0.2) !important;
  }
  #navi-in .menu-item a {
    padding: 10px 20px !important;
    font-size: 0.82em !important;
    display: block !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
  }
  #navi-in .item-caption, #navi-in .sub-menu { display: none !important; }
  .oc-section { margin-bottom: 16px !important; }
}

/* ===== カテゴリ別記事タイトル: 2行表示 ===== */
.oc-cat-box-list a {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  white-space: normal !important;
}

/* ===== デザイン修正 v2 2026-05-11 ===== */

/* セクション見出し: Cocoonのh2スタイルを上書き */
.oc-section-title,
.article .oc-section-title,
.entry-content .oc-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2c5364;
  margin: 0;
  padding: 2px 0 2px 12px;
  background: none;
  background-color: transparent;
  border-style: solid;
  border-width: 0 0 0 4px;
  border-color: #2c5364;
  box-shadow: none;
  line-height: 1.4;
  display: block;
}

/* セクションヘッダー余白整理 */
.oc-section-header {
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: none;
}

/* シミュレーターボタンをコンパクトに */
.oc-sim-card {
  padding: 14px 12px;
  font-size: 0.92em;
  border-radius: 8px;
}
.oc-sim-grid { gap: 10px; }

/* 悩みタグを小さく */
.oc-worry-tag {
  font-size: 0.82em;
  padding: 5px 12px;
}
.oc-worry-tags { gap: 7px; }

/* 記事カードタイトル2行クランプ */
.oc-card-title {
  -webkit-line-clamp: 2;
  font-size: 0.85em;
}

/* セクション間隔 */
.oc-section { margin-bottom: 20px; }

/* カードグリッド間隔 */
.oc-card-grid { gap: 14px; }
.oc-cat-grid  { gap: 16px; }

/* カテゴリボックスヘッダー */
.oc-cat-box-header {
  font-size: 0.91em;
  padding: 10px 14px;
}

/* トップページ上部パディング */
#oc-top { padding-top: 16px; }

/* ===== SP グロナビ修正 v3 2026-05-11 ===== */
@media (max-width: 768px) {
  #navi { display: block !important; overflow: hidden !important; width: 100% !important; }
  #navi-in {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  #navi-in::-webkit-scrollbar { display: none !important; }

  #navi-in .menu-top,
  #navi .navi-in > ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  #navi-in .menu-item,
  #navi .navi-in > ul > li {
    flex: 0 0 auto !important;
    width: auto !important;
    border-right: 1px solid rgba(255,255,255,0.2) !important;
  }

  #navi-in .caption-wrap {
    display: flex !important;
    align-items: center !important;
  }

  #navi-in .item-label {
    display: block !important;
    white-space: nowrap !important;
  }

  #navi-in .item-caption,
  #navi-in .sub-menu { display: none !important; }

  #navi-in .menu-item a,
  #navi .navi-in > ul > li > a {
    padding: 10px 18px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.9) !important;
    white-space: nowrap !important;
    display: block !important;
  }
  #navi-in .menu-item a:hover {
    background: rgba(255,255,255,0.1) !important;
  }
}


/* ===== SP ナビ縦中央揃え + SP バー位置修正 2026-05-11 ===== */
@media (max-width: 768px) {
  #navi-in .menu-item {
    display: flex !important;
    align-items: stretch !important;
  }
  #navi-in .menu-item a {
    display: flex !important;
    align-items: center !important;
  }
  #oc-sp-bar {
    bottom: calc(50px + env(safe-area-inset-bottom)) !important;
  }
  #oc-top {
    padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
  }
}


/* ===== SP ナビ縦中央揃え v2（高specificity） + TOP非表示 2026-05-11 ===== */
@media (max-width: 768px) {
  #navi-in .menu-top .menu-item a {
    display: flex !important;
    align-items: center !important;
  }
}
body.front-page #oc-sp-bar,
body.home #oc-sp-bar {
  display: none !important;
}
