/*
Theme Name: AffiliMax Theme
Theme URI: https://affilimax.dev
Author: KAZUMA
Author URI: https://affilimax.dev
Description: アフィリエイト特化型AIサイトビルダーWordPressテーマ。商品データを読み込むだけで,AIがLP・レビュー・比較記事・SEO権威記事を自動生成し,売れるアフィリエイトサイトを丸ごと構築します。
Version: 16.9.27
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: affilimax
Tags: affiliate, ai, seo, responsive, e-commerce, blog
*/

/* =============================================================================
   CSS カスタムプロパティ設計思想:
   全カラー・スペーシング・タイポグラフィをCSS変数で一元管理し、
   AIによるデザイン変更コマンドが :root の変数を書き換えるだけで
   サイト全体に即時反映される構造にしている。
   ============================================================================= */

:root {
  /* ── カラーシステム（デフォルト: 洗練されたモダンライト）── */
  --am-primary:        #64748b;
  /* --am-primary-light 等の派生色はスキンのメインカラーから自動でニュアンスが決まるように、ここでは個別の色指定を廃止 */
  --am-secondary:      #ec4899;   /* セカンダリ（ピンク） */
  --am-accent:         #06b6d4;   /* アクセント（シアン） */

  /* ── 背景・サーフェス ── */
  --am-bg:             #fafafc;   /* ページ背景（清潔感のあるオフホワイト） */
  --am-bg-alt:         #f1f5f9;   /* セクション背景 */
  --am-surface:        #ffffff;   /* カード・パネル */
  --am-surface-hover:  #f8fafc;   /* ホバー時サーフェス */
  --am-border:         rgba(0, 0, 0, 0.06); /* 非常に繊細なボーダー */

  /* ── テキスト ── */
  --am-text-primary:   #0f172a;   /* メインテキスト（深いネイビー） */
  --am-text-secondary: #475569;   /* サブテキスト */
  --am-text-muted:     #94a3b8;   /* ミュートテキスト */

  /* Why: 見出しグラデーションなどの終点カラーをアクセントカラー（--am-accent）に連動させ、管理画面からの設定を反映します。 */
  --am-grad-primary:   linear-gradient(135deg, var(--am-primary) 0%, var(--am-accent) 100%);
  --am-grad-surface:   linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --am-grad-glow:      radial-gradient(ellipse at center, rgba(59, 130, 246, 0.08), transparent 70%);

  /* ── ジオメトリ（形状） ── */
  --am-radius-default: 16px;
  --am-radius-button:  999px;
  --am-border-width:   1px;
  --am-border-style:   solid;
  
  /* ── 装飾 ── */
  --am-shadow-main:    0 12px 24px rgba(0, 0, 0, 0.05);
  --am-shadow-hover:   0 20px 48px rgba(0, 0, 0, 0.08);
  --am-glass-blur:     15px;
  --am-glass-bg:       rgba(255, 255, 255, 0.3);

  /* ── タイポグラフィ ── */
  --am-font-sans:      'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  --am-font-display:   'Outfit', 'Noto Sans JP', sans-serif;
  --am-font-mono:      'JetBrains Mono', 'Consolas', monospace;
  --am-font-weight-heading: 700;
  --am-letter-spacing:      0;

  --am-text-xs:    0.75rem;
  --am-text-sm:    0.875rem;
  --am-text-base:  1rem;
  --am-text-lg:    1.125rem;
  --am-text-xl:    1.25rem;
  --am-text-2xl:   1.5rem;
  --am-text-3xl:   1.875rem;
  --am-text-4xl:   2.25rem;
  --am-text-5xl:   3rem;

  /* ── スペーシング ── */
  --am-gap-xs:    0.25rem;
  --am-gap-sm:    0.5rem;
  --am-gap-md:    1rem;
  --am-gap-lg:    1.5rem;
  --am-gap-xl:    2rem;
  --am-gap-2xl:   3rem;
  --am-gap-3xl:   4rem;

  /* ── ボーダー半径（より丸みを帯びたデザインへ） ── */
  --am-radius-sm:   10px;
  --am-radius-md:   16px;
  --am-radius-lg:   24px;
  --am-radius-xl:   32px;
  --am-radius-full: 9999px;

  /* ── シャドウ（柔らかくモダンな影） ── */
  --am-shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.04);
  --am-shadow-md:  0 12px 24px rgba(0, 0, 0, 0.05);
  --am-shadow-lg:  0 20px 48px rgba(0, 0, 0, 0.08);
  --am-shadow-glow: 0 8px 24px rgba(124, 58, 237, 0.2);

  /* ── トランジション ── */
  --am-transition-fast:   0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --am-transition-base:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --am-transition-slow:   0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── コンテナ幅 ── */
  --am-container:       1240px;
  --am-container-sm:    800px;
  --am-container-xs:    480px;

  /* ── ヘッダー高さ ── */
  --am-header-h:        72px;
}

/* =============================================================================
   ダークモード（必要に応じて手動またはオプションで付与）
   ============================================================================= */
/* ダークモード時は、スキンの色がベースになるが、一部のコントラストのみ調整が必要な場合のみここに記述する */
.am-dark-mode {
  /* スキンの色が優先されるため、ここでは色の直書きを廃止 */
}

/* =============================================================================
   リセット & ベーススタイル
   ============================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--am-font-sans);
  font-size: var(--am-text-base);
  color: var(--am-text-primary);
  background-color: var(--am-bg);
  line-height: 1.7;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--am-primary);
  text-decoration: none;
  transition: color var(--am-transition-fast);
}
a:hover { opacity: 0.8; }

/* =============================================================================
   レイアウト共通
   ============================================================================= */
.am-container {
  width: 100%;
  max-width: var(--am-container);
  margin-inline: auto;
  padding-inline: var(--am-gap-lg);
}

.am-container--sm {
  max-width: var(--am-container-sm);
}

/* =============================================================================
   タイポグラフィ共通
   ============================================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--am-font-display);
  font-weight: var(--am-font-weight-heading);
  color: var(--am-text-primary);
  line-height: 1.3;
  letter-spacing: var(--am-letter-spacing);
  margin-bottom: var(--am-gap-md);
}

h1 { font-size: var(--am-text-4xl); font-weight: 800; }
h2 { font-size: var(--am-text-3xl); font-weight: 700; }
h3 { font-size: var(--am-text-2xl); font-weight: 700; }
h4 { font-size: var(--am-text-xl);  font-weight: 600; }

p { margin-bottom: var(--am-gap-md); }

/* =============================================================================
   ボタン共通
   ============================================================================= */
.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--am-radius-button);
  transition: all var(--am-transition-base);
  cursor: pointer;
  border: var(--am-border-width) var(--am-border-style) transparent;
  gap: var(--am-gap-sm);
  white-space: nowrap;
}

.am-btn--primary {
  background: var(--am-grad-primary);
  color: #fff;
  box-shadow: var(--am-shadow-glow);
}
.am-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.15);
  color: #fff;
}

.am-btn--outline {
  background: transparent;
  color: var(--am-primary);
  border: 1.5px solid var(--am-primary);
}
.am-btn--outline:hover {
  background: var(--am-bg-alt);
  color: var(--am-primary);
}

.am-btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--am-text-secondary);
  border: 1.5px solid var(--am-border);
}
.am-btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--am-primary);
  color: var(--am-text-primary);
}

.am-btn--lg { padding: 1rem 2rem; font-size: var(--am-text-base); }
.am-btn--sm { padding: 0.5rem 1rem;  font-size: var(--am-text-xs);  }

/* =============================================================================
   カード共通
   ============================================================================= */
.am-card {
  background: var(--am-surface);
  border: var(--am-border-width) var(--am-border-style) var(--am-border);
  border-radius: var(--am-radius-md);
  padding: var(--am-gap-xl);
  transition: all var(--am-transition-base);
  box-shadow: var(--am-shadow-main);
}
/* --- Sidebar Design Variants --- */
.am-sidebar-type-card .am-widget {
  background: var(--am-surface);
  border: var(--am-border-width) var(--am-border-style) var(--am-border);
  border-radius: var(--am-radius-md);
  padding: var(--am-gap-lg);
  margin-bottom: var(--am-gap-xl);
  box-shadow: var(--am-shadow-main);
}

.am-sidebar-type-clean .am-widget {
  background: transparent;
  border-bottom: 1px solid var(--am-border);
  padding: var(--am-gap-lg) 0;
  margin-bottom: var(--am-gap-lg);
}

.am-sidebar-type-soft-card .am-widget {
  background: var(--am-bg-alt);
  border-radius: var(--am-radius-md);
  padding: var(--am-gap-lg);
  margin-bottom: var(--am-gap-xl);
}

.am-sidebar-type-glass .am-widget {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(var(--am-glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--am-radius-md);
  padding: var(--am-gap-lg);
  margin-bottom: var(--am-gap-xl);
  color: var(--am-text-secondary);
}

.am-sidebar-type-retro-box .am-widget {
  background: var(--am-surface);
  border: 3px solid #000;
  box-shadow: 6px 6px 0px #000;
  padding: var(--am-gap-lg);
  margin-bottom: var(--am-gap-2xl);
  border-radius: 0;
}

.am-sidebar-type-minimal .am-widget {
  padding: var(--am-gap-lg) 0;
  margin-bottom: var(--am-gap-xl);
}
.am-sidebar-type-minimal .am-widget-title {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--am-primary);
  display: inline-block;
  margin-bottom: var(--am-gap-md);
}
.am-card:hover {
  background: var(--am-surface-hover);
  border-color: var(--am-primary);
  box-shadow: var(--am-shadow-hover);
  transform: translateY(-2px);
}

/* =============================================================================
   バッジ
   ============================================================================= */
.am-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--am-radius-full);
  font-size: var(--am-text-xs);
  font-weight: 600;
}
.am-badge--primary { background: rgba(124,58,237,0.15); color: var(--am-primary); }
.am-badge--success { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.am-badge--warning { background: rgba(245,158,11,0.15); color: #fcd34d; }
.am-badge--danger  { background: rgba(239,68,68 ,0.15); color: #fca5a5; }

/* =============================================================================
   ヘッダー
   ============================================================================= */
header.am-header,
.am-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--am-header-h);
  background-color: var(--am-header-bg) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--am-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* スキン別の疑似要素装飾(::before, ::after)に必要 */
  position: sticky;
}

.am-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--am-container-width);
  margin: 0 auto;
  padding: 0 var(--am-gap-xl);
}

.am-header__logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--am-text-primary);
  text-decoration: none;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--am-primary) 0%, var(--am-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.3s ease;
}

.am-header__logo:hover {
  opacity: 0.8;
}

.am-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.am-header__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--am-text-primary);
  text-decoration: none;
  letter-spacing: -0.025em;
}

/* ナビゲーション */
.am-nav {
  display: flex;
  align-items: center;
  gap: var(--am-gap-xl);
  list-style: none;
}

/* PC用およびモバイル用のナビゲーションコンテナ表示制御
   Why: PC用メニューとモバイル用メニューの表示・非表示を明示的にコンテナ単位で制御します。 */
.am-nav-container-pc {
  display: block;
}
.am-nav-container-mobile {
  display: none;
}
.am-header__nav a {
  text-decoration: none;
  color: var(--am-text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--am-transition-smooth);
}

.am-header__nav a:hover {
  color: var(--am-primary);
}

/* ハンバーガーメニュー（モバイル） */
.am-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--am-gap-sm);
}
.am-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--am-text-primary);
  border-radius: 2px;
  transition: all var(--am-transition-base);
}

/* =============================================================================
   フッター
   ============================================================================= */
footer.am-footer,
.am-footer {
  background-color: var(--am-footer-bg) !important;
  color: var(--am-text-secondary);
  border-top: 1px solid var(--am-border);
  padding: var(--am-gap-4xl) 0 var(--am-gap-2xl);
  margin-top: 5rem;
}

.am-footer__inner {
  max-width: var(--am-container-width);
  margin: 0 auto;
  padding: 0 var(--am-gap-xl);
  display: grid;
  /* Why: ブランドエリア(320px固定)と、右側ウィジェットエリア(残りのスペース)を綺麗に2分割します */
  grid-template-columns: 320px 1fr;
  gap: var(--am-gap-3xl);
}

.am-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--am-gap-md);
}

.am-footer__logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--am-text-primary);
  text-decoration: none;
}

.am-footer__grid {
  display: grid;
  /* Why: ウィジェットの数に関わらず自動的に列数を最適化（最小180px）し、
         フッターメニューの文字などが押しつぶされないようにします */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--am-gap-2xl);
  margin-bottom: var(--am-gap-2xl);
}

.am-footer__desc {
  color: var(--am-text-secondary);
  font-size: var(--am-text-sm);
  line-height: 1.8;
  max-width: 320px;
}

.am-footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.am-footer-menu li {
  margin-bottom: 0.75rem;
}

.am-footer-menu a {
  color: var(--am-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.am-footer-menu a:hover {
  color: var(--am-primary);
}

.am-footer__legal-link {
  margin-left: 1.5rem;
  color: var(--am-text-muted);
  font-size: var(--am-text-xs);
  text-decoration: none;
  transition: color 0.3s ease;
}

.am-footer__legal-link:hover {
  color: var(--am-primary);
}

.am-footer__copy {
  margin-top: var(--am-gap-4xl);
  padding-top: var(--am-gap-xl);
  border-top: 1px solid var(--am-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--am-text-muted);
  font-size: var(--am-text-xs);
}

/* =============================================================================
   スティッキーCTAバー（モバイル専用）
   – 記事ページでスクロールしても常に購入ボタンを表示する
   ============================================================================= */
.am-sticky-cta {
  display: none; /* PCでは非表示 */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--am-surface);
  border-top: 1px solid var(--am-border);
  padding: var(--am-gap-sm) var(--am-gap-md);
  gap: var(--am-gap-sm);
}

/* =============================================================================
   ユーティリティ
   ============================================================================= */
.am-text-gradient {
  background: var(--am-grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.am-section {
  padding: var(--am-gap-3xl) 0;
}

.am-section--alt {
  background: var(--am-bg-alt);
}

/* Why: 投稿カード（タイル）同士の余白（ギャップ）を管理画面の設定値（am-card-gap）でPC表示でも動的に制御できるように変更します。 */
.am-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--am-card-gap, var(--am-gap-xl)); }
.am-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--am-card-gap, var(--am-gap-xl)); }
.am-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--am-card-gap, var(--am-gap-xl)); }

.am-flex       { display: flex; }
.am-flex-col   { flex-direction: column; }
.am-items-center{ align-items: center; }
.am-justify-between { justify-content: space-between; }
.am-gap-md     { gap: var(--am-gap-md); }

.am-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================================================
   レスポンシブ（モバイルファースト）
   ============================================================================= */
@media (max-width: 1024px) {
  :root { --am-container: 100%; }
  .am-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --am-text-4xl: 1.875rem;
    --am-text-3xl: 1.5rem;
    --am-text-2xl: 1.25rem;
  }

  /* モバイル表示時のナビゲーションコンテナ出し分け
     Why: モバイル表示時はPC用を完全に非表示にし、ヘッダー外に配置したモバイル用コンテナを表示します。 */
  .am-nav-container-pc {
    display: none;
  }
  .am-nav-container-mobile {
    display: block;
  }

  .am-nav-pc { display: none; }
  .am-nav-mobile { display: none; }
  .am-nav-mobile.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--am-bg);
    /* Why: ヘッダー（z-index: 100）の背面に回り込ませるため、ヘッダーの高さ分のパディングを上部に設けます。 */
    padding: calc(var(--am-header-h) + var(--am-gap-xl)) var(--am-gap-xl) var(--am-gap-xl);
    gap: var(--am-gap-lg);
    z-index: 99;
    overflow-y: auto; /* Why: メニュー項目が画面高さに収まらない場合にスクロール可能にします。 */
  }

  .am-hamburger { display: flex; }
  .am-grid-2, .am-grid-3, .am-grid-4, .am-post-grid {
    grid-template-columns: 1fr;
    /* Why: 管理画面のスライダーで設定した共通のタイル（カード）同士の余白を動的に適用します。 */
    gap: var(--am-card-gap, var(--am-gap-xl)) !important;
  }

  /* モバイル表示時のフッターレイアウト調整
     Why: 狭い画面ではブランドとメニューを縦積みにし、メニューの表示幅を最適化、
          またコピーライトなどのテキストを中央揃えにして配置を綺麗にします */
  .am-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--am-gap-2xl);
  }
  .am-footer__grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .am-footer__copy {
    flex-direction: column;
    gap: var(--am-gap-sm);
    text-align: center;
    align-items: center;
  }
  .am-footer__legal-link {
    margin-left: 0;
  }

  /* スティッキーCTAバーを表示 */
  .am-sticky-cta { display: flex; }
}

@media (max-width: 480px) {
  h1 { font-size: var(--am-text-3xl); }
}

/* ==========================================================================
   AffiliMax Modern UI & Micro Animations (Phase 2 Additions)
   ========================================================================== */

/* Typography & Base Variables Refinement */
:root {
    --am-radius-sm:   10px;
    --am-radius-md:   16px;
    --am-radius-lg:   24px;
    --am-radius-xl:   32px;
    --am-glass-bg: rgba(255, 255, 255, 0.8);
    --am-glass-border: rgba(255, 255, 255, 0.5);
    --am-shadow-lift: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --am-transition-spring: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    --am-transition-smooth: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Base Helpers */
.am-text-center { text-align: center; }
.am-border-radius-large { border-radius: var(--am-radius-lg); overflow: hidden; }

/* Micro Animations (Framer Motion equivalent in CSS) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.am-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.am-hover-lift {
    transition: var(--am-transition-spring);
    will-change: transform;
}
.am-hover-lift:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--am-shadow-lift);
}

/* Glassmorphism Panel */
.am-glass-panel {
    background: var(--am-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--am-glass-border);
    border-radius: var(--am-radius-md);
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

/* --- Single Page Layout --- */
.am-single-container {
    display: grid;
    gap: var(--am-gap-2xl);
    max-width: var(--am-container);
    margin: 0 auto;
}

/* 1カラム（サイドバーなし） */
.am-cols-1 .am-single-container {
    grid-template-columns: 1fr;
    max-width: 800px;
}

/* 2カラム（標準：右サイドバー） */
.am-cols-2 .am-single-container {
    grid-template-columns: 1fr 320px;
}

/* 3カラム（両サイドバー） */
.am-cols-3 .am-single-container {
    grid-template-columns: 280px 1fr 280px;
}

.am-single-article {
    background: var(--am-surface);
    border-radius: var(--am-radius-lg);
    padding: 3rem;
    box-shadow: var(--am-shadow-md);
    margin-bottom: 4rem;
}

@media (max-width: 1024px) {
    .am-single-container {
        grid-template-columns: 1fr;
    }
}

.am-entry-header { margin-bottom: 2.5rem; text-align: center; }
.am-entry-title { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 1rem; color: var(--am-text-primary); }

.am-entry-meta { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--am-text-secondary); font-size: 0.95rem; margin-bottom: 1rem; }
.am-cat-badge { background: var(--am-bg); color: var(--am-primary); padding: 0.25rem 0.75rem; border-radius: 999px; font-weight: 600; font-size: 0.85rem; }

.am-product-meta { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 1.1rem; }
.am-rating { color: #f59e0b; font-weight: 700; }
.am-review-count { color: var(--am-text-muted); font-size: 0.9rem; }

.am-post-thumbnail { border-radius: var(--am-radius-md); overflow: hidden; margin-bottom: 3rem; box-shadow: var(--am-shadow-md); }
.am-post-thumbnail img { width: 100%; height: auto; display: block; object-fit: cover; aspect-ratio: 16/9; }

/* --- Content Typography (Skin Responsive) --- */

.am-entry-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 4rem 0 1.5rem;
  padding: 0.5rem 0;
  color: var(--am-text-primary);
  line-height: 1.3;
}

.am-entry-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1.25rem;
  color: var(--am-text-primary);
}

.am-entry-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--am-text-secondary);
}

/* --- H2 Style Variants (10 Types) --- */

/* --- Heading Style Variants (H2-H6 / 20 Types) --- */

/* 1. Left Border */
.am-h2-style-left-border .am-entry-content h2, .am-h3-style-left-border .am-entry-content h3,
.am-h4-style-left-border .am-entry-content h4, .am-h5-style-left-border .am-entry-content h5,
.am-h6-style-left-border .am-entry-content h6 {
  padding: 0.5rem 1.25rem;
  border-left: 6px solid var(--am-primary);
  background: transparent;
}

/* 2. Bottom Border */
.am-h2-style-bottom-border .am-entry-content h2, .am-h3-style-bottom-border .am-entry-content h3,
.am-h4-style-bottom-border .am-entry-content h4, .am-h5-style-bottom-border .am-entry-content h5,
.am-h6-style-bottom-border .am-entry-content h6 {
  padding-bottom: 0.8rem;
  border-bottom: 3px solid var(--am-primary);
}

/* 3. Bubble */
.am-h2-style-bubble .am-entry-content h2, .am-h3-style-bubble .am-entry-content h3,
.am-h4-style-bubble .am-entry-content h4, .am-h5-style-bubble .am-entry-content h5,
.am-h6-style-bubble .am-entry-content h6 {
  background: var(--am-bg-alt);
  color: var(--am-primary);
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--am-primary);
  display: inline-block;
}

/* 4. Stripe BG */
.am-h2-style-stripe-bg .am-entry-content h2, .am-h3-style-stripe-bg .am-entry-content h3,
.am-h4-style-stripe-bg .am-entry-content h4, .am-h5-style-stripe-bg .am-entry-content h5,
.am-h6-style-stripe-bg .am-entry-content h6 {
  background: repeating-linear-gradient(45deg, var(--am-bg-alt), var(--am-bg-alt) 10px, #ffffff 10px, #ffffff 20px);
  padding: 1rem;
  border-left: 8px solid var(--am-primary);
  border-radius: 4px;
}

/* 5. Underline Accent */
.am-h2-style-underline-accent .am-entry-content h2, .am-h3-style-underline-accent .am-entry-content h3,
.am-h4-style-underline-accent .am-entry-content h4, .am-h5-style-underline-accent .am-entry-content h5,
.am-h6-style-underline-accent .am-entry-content h6 {
  position: relative;
  padding-bottom: 1rem;
}
.am-h2-style-underline-accent .am-entry-content h2::after, .am-h3-style-underline-accent .am-entry-content h3::after,
.am-h4-style-underline-accent .am-entry-content h4::after, .am-h5-style-underline-accent .am-entry-content h5::after,
.am-h6-style-underline-accent .am-entry-content h6::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--am-primary);
  border-radius: 10px;
}

/* 6. Simple Line */
.am-h2-style-simple-line .am-entry-content h2, .am-h3-style-simple-line .am-entry-content h3,
.am-h4-style-simple-line .am-entry-content h4, .am-h5-style-simple-line .am-entry-content h5,
.am-h6-style-simple-line .am-entry-content h6 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--am-border);
}

/* 7. Fill BG */
.am-h2-style-fill-bg .am-entry-content h2, .am-h3-style-fill-bg .am-entry-content h3,
.am-h4-style-fill-bg .am-entry-content h4, .am-h5-style-fill-bg .am-entry-content h5,
.am-h6-style-fill-bg .am-entry-content h6 {
  background: var(--am-primary);
  color: #fff;
  padding: 0.8rem 1.25rem;
  border-radius: var(--am-radius-md);
}

/* 8. Glass Accent */
.am-h2-style-glass-accent .am-entry-content h2, .am-h3-style-glass-accent .am-entry-content h3,
.am-h4-style-glass-accent .am-entry-content h4, .am-h5-style-glass-accent .am-entry-content h5,
.am-h6-style-glass-accent .am-entry-content h6 {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 0.8rem 1.25rem;
  border-radius: var(--am-radius-md);
  border: 1px solid var(--am-border);
  color: var(--am-primary);
}

/* 9. Double Border */
.am-h2-style-double-border .am-entry-content h2, .am-h3-style-double-border .am-entry-content h3,
.am-h4-style-double-border .am-entry-content h4, .am-h5-style-double-border .am-entry-content h5,
.am-h6-style-double-border .am-entry-content h6 {
  border-top: 2px solid var(--am-primary);
  border-bottom: 2px solid var(--am-primary);
  padding: 0.8rem 0;
}

/* 10. Gradient Underline */
.am-h2-style-gradient-underline .am-entry-content h2, .am-h3-style-gradient-underline .am-entry-content h3,
.am-h4-style-gradient-underline .am-entry-content h4, .am-h5-style-gradient-underline .am-entry-content h5,
.am-h6-style-gradient-underline .am-entry-content h6 {
  position: relative;
  padding-bottom: 0.8rem;
}
.am-h2-style-gradient-underline .am-entry-content h2::after, .am-h3-style-gradient-underline .am-entry-content h3::after,
.am-h4-style-gradient-underline .am-entry-content h4::after, .am-h5-style-gradient-underline .am-entry-content h5::after,
.am-h6-style-gradient-underline .am-entry-content h6::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--am-grad-primary);
}

/* 11. Stitched */
.am-h2-style-stitched .am-entry-content h2, .am-h3-style-stitched .am-entry-content h3,
.am-h4-style-stitched .am-entry-content h4, .am-h5-style-stitched .am-entry-content h5,
.am-h6-style-stitched .am-entry-content h6 {
  background: var(--am-primary);
  color: #fff;
  padding: 0.8rem 1.25rem;
  border-radius: 4px;
  box-shadow: 0 0 0 4px var(--am-primary);
  border: 1px dashed #fff;
  margin: 10px;
}

/* 12. Ribbon */
.am-h2-style-ribbon .am-entry-content h2, .am-h3-style-ribbon .am-entry-content h3,
.am-h4-style-ribbon .am-entry-content h4, .am-h5-style-ribbon .am-entry-content h5,
.am-h6-style-ribbon .am-entry-content h6 {
  position: relative;
  padding: 0.5rem 1rem;
  background: var(--am-primary);
  color: #fff;
  margin-left: -10px;
}
.am-h2-style-ribbon .am-entry-content h2::before, .am-h3-style-ribbon .am-entry-content h3::before,
.am-h4-style-ribbon .am-entry-content h4::before, .am-h5-style-ribbon .am-entry-content h5::before,
.am-h6-style-ribbon .am-entry-content h6::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  border: none;
  border-bottom: solid 10px transparent;
  border-right: solid 10px var(--am-primary-dark, #000);
  opacity: 0.5;
}

/* 13. Marker */
.am-h2-style-marker .am-entry-content h2, .am-h3-style-marker .am-entry-content h3,
.am-h4-style-marker .am-entry-content h4, .am-h5-style-marker .am-entry-content h5,
.am-h6-style-marker .am-entry-content h6 {
  background: linear-gradient(transparent 60%, var(--am-primary) 60%);
  opacity: 0.8;
  display: inline;
  padding: 0 0.5rem;
}

/* 14. Two-tone Line */
.am-h2-style-two-tone-line .am-entry-content h2, .am-h3-style-two-tone-line .am-entry-content h3,
.am-h4-style-two-tone-line .am-entry-content h4, .am-h5-style-two-tone-line .am-entry-content h5,
.am-h6-style-two-tone-line .am-entry-content h6 {
  border-bottom: solid 3px var(--am-border);
  position: relative;
  padding-bottom: 0.5rem;
}
.am-h2-style-two-tone-line .am-entry-content h2::after, .am-h3-style-two-tone-line .am-entry-content h3::after,
.am-h4-style-two-tone-line .am-entry-content h4::after, .am-h5-style-two-tone-line .am-entry-content h5::after,
.am-h6-style-two-tone-line .am-entry-content h6::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 25%;
  border-bottom: solid 3px var(--am-primary);
}

/* 15. Bracket */
.am-h2-style-bracket .am-entry-content h2, .am-h3-style-bracket .am-entry-content h3,
.am-h4-style-bracket .am-entry-content h4, .am-h5-style-bracket .am-entry-content h5,
.am-h6-style-bracket .am-entry-content h6 {
  display: inline-block;
  padding: 0 1rem;
  position: relative;
}
.am-h2-style-bracket .am-entry-content h2::before, .am-h3-style-bracket .am-entry-content h3::before,
.am-h4-style-bracket .am-entry-content h4::before, .am-h5-style-bracket .am-entry-content h5::before,
.am-h6-style-bracket .am-entry-content h6::before {
  content: '[';
  color: var(--am-primary);
  margin-right: 0.5rem;
  font-weight: 800;
}
.am-h2-style-bracket .am-entry-content h2::after, .am-h3-style-bracket .am-entry-content h3::after,
.am-h4-style-bracket .am-entry-content h4::after, .am-h5-style-bracket .am-entry-content h5::after,
.am-h6-style-bracket .am-entry-content h6::after {
  content: ']';
  color: var(--am-primary);
  margin-left: 0.5rem;
  font-weight: 800;
}

/* 16. Quote Style */
.am-h2-style-quote .am-entry-content h2, .am-h3-style-quote .am-entry-content h3,
.am-h4-style-quote .am-entry-content h4, .am-h5-style-quote .am-entry-content h5,
.am-h6-style-quote .am-entry-content h6 {
  position: relative;
  padding: 1rem 2rem;
  color: var(--am-text-primary);
}
.am-h2-style-quote .am-entry-content h2::before, .am-h3-style-quote .am-entry-content h3::before,
.am-h4-style-quote .am-entry-content h4::before, .am-h5-style-quote .am-entry-content h5::before,
.am-h6-style-quote .am-entry-content h6::before {
  content: '“';
  position: absolute;
  top: 0;
  left: 0;
  font-size: 3rem;
  color: var(--am-primary);
  opacity: 0.2;
  font-family: serif;
}

/* 17. Paper Roll */
.am-h2-style-paper-roll .am-entry-content h2, .am-h3-style-paper-roll .am-entry-content h3,
.am-h4-style-paper-roll .am-entry-content h4, .am-h5-style-paper-roll .am-entry-content h5,
.am-h6-style-paper-roll .am-entry-content h6 {
  position: relative;
  background: var(--am-bg-alt);
  padding: 0.8rem 1.25rem;
  border-left: 5px solid var(--am-primary);
}
.am-h2-style-paper-roll .am-entry-content h2::after, .am-h3-style-paper-roll .am-entry-content h3::after,
.am-h4-style-paper-roll .am-entry-content h4::after, .am-h5-style-paper-roll .am-entry-content h5::after,
.am-h6-style-paper-roll .am-entry-content h6::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 15px 15px 0;
  border-style: solid;
  border-color: #fff #fff var(--am-primary) var(--am-primary);
  opacity: 0.3;
  box-shadow: -1px 1px 2px rgba(0,0,0,0.1);
}

/* 18. Check Mark */
.am-h2-style-check-mark .am-entry-content h2, .am-h3-style-check-mark .am-entry-content h3,
.am-h4-style-check-mark .am-entry-content h4, .am-h5-style-check-mark .am-entry-content h5,
.am-h6-style-check-mark .am-entry-content h6 {
  position: relative;
  padding-left: 2rem;
}
.am-h2-style-check-mark .am-entry-content h2::before, .am-h3-style-check-mark .am-entry-content h3::before,
.am-h4-style-check-mark .am-entry-content h4::before, .am-h5-style-check-mark .am-entry-content h5::before,
.am-h6-style-check-mark .am-entry-content h6::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--am-primary);
  font-weight: 900;
}

/* 19. Dotted Bracket */
.am-h2-style-dotted-bracket .am-entry-content h2, .am-h3-style-dotted-bracket .am-entry-content h3,
.am-h4-style-dotted-bracket .am-entry-content h4, .am-h5-style-dotted-bracket .am-entry-content h5,
.am-h6-style-dotted-bracket .am-entry-content h6 {
  padding: 0.5rem 1rem;
  border: 1px dotted var(--am-primary);
  border-left: 8px solid var(--am-primary);
  background: var(--am-bg-alt);
}

/* 20. Overlap Circle */
.am-h2-style-overlap-circle .am-entry-content h2, .am-h3-style-overlap-circle .am-entry-content h3,
.am-h4-style-overlap-circle .am-entry-content h4, .am-h5-style-overlap-circle .am-entry-content h5,
.am-h6-style-overlap-circle .am-entry-content h6 {
  position: relative;
  padding-left: 1rem;
  z-index: 1;
}
.am-h2-style-overlap-circle .am-entry-content h2::before, .am-h3-style-overlap-circle .am-entry-content h3::before,
.am-h4-style-overlap-circle .am-entry-content h4::before, .am-h5-style-overlap-circle .am-entry-content h5::before,
.am-h6-style-overlap-circle .am-entry-content h6::before {
  content: "";
  position: absolute;
  background: var(--am-primary);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
  z-index: -1;
  opacity: 0.15;
}

/* 10. Simple Line (Minimal) - Nordicと共用 */

/* Product Actions inside Single */
.am-product-quick-info { margin-bottom: 2.5rem; text-align: center; }
.am-product-quick-info .am-price { font-size: 1.5rem; margin-bottom: 1.5rem; }
.am-product-quick-info .am-price strong { font-size: 2rem; color: var(--am-text-main); }
.am-cta-wrapper { display: flex; flex-direction: column; gap: 0.75rem; max-width: 400px; margin: 0 auto; }
.am-cta-wrapper .am-btn { width: 100%; border-radius: var(--am-radius-button); font-weight: 700; text-decoration: none; padding: 1rem; transition: var(--am-transition-spring); }
.am-cta-wrapper .am-btn-large { font-size: 1.2rem; padding: 1.25rem; background: var(--am-grad-primary); color: #fff; box-shadow: var(--am-shadow-main); border: none; }
.am-cta-wrapper .am-btn-large:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--am-shadow-hover); }
.am-cta-wrapper .am-btn-secondary { background: #f1f5f9; color: #334155; }
.am-cta-wrapper .am-btn-secondary:hover { background: #e2e8f0; transform: translateY(-2px); }

/* --- Archive / Grid Styles --- */
.am-page-header { text-align: center; margin-bottom: 4rem; }
.am-page-title { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; }
.am-archive-description { color: #64748b; font-size: 1.2rem; max-width: 600px; margin: 1rem auto 0; }

/* Why: 投稿カード（タイル）同士の余白（ギャップ）を設定した共通の余白値（am-card-gap）で動的に制御できるように適用します。 */
.am-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--am-card-gap, 2.5rem); padding: 1rem 0; }

.am-card-article { background: var(--am-surface); border-radius: var(--am-radius-md); overflow: hidden; box-shadow: var(--am-shadow-sm); border: 1px solid var(--am-border); display: flex; flex-direction: column; height: 100%; transition: var(--am-transition-base); }
.am-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }

.am-card-thumbnail { position: relative; width: 100%; padding-top: 60%; overflow: hidden; background: #f8fafc; }
.am-card-thumbnail img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.am-card-article:hover .am-card-thumbnail img { transform: scale(1.05); }

.am-card-price-badge { position: absolute; bottom: 1rem; right: 1rem; background: rgba(0, 0, 0, 0.7); color: #fff; padding: 0.4rem 0.8rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; backdrop-filter: blur(4px); }

.am-card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
/* カテゴリーバッジ of テキストカラーおよび枠線には管理画面のアクセントカラー（--am-accent）を連動させます */
/* Why: カテゴリーバッジのカラーをアクセントカラーに連動させます。タイル幅縮小時の折り返し防止の最大幅制限と省略を設定します。 */
.am-card-cat { display: inline-block; color: var(--am-accent); border: 1.5px solid var(--am-accent); padding: 3px 10px; border-radius: var(--am-radius-sm, 6px); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: transparent; line-height: 1.2; max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* 投稿カード内のタグ表示。少し控えめなニュアンスカラーを適用します */
/* Why: カテゴリーと同様に、カード幅に収まりきらないタグが改行されるのを防ぐため、最大幅制限と省略処理を施し、フォントサイズを0.68remに縮小します */
.am-card-tag { display: inline-block; color: var(--am-text-secondary); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; max-width: 80px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* 個別記事タイトル下のタグ表示。省略せずにすべて表示させます */
/* Why: 記事ページでは十分な表示領域があるため、カード用タグと異なり最大幅制限（max-width）や省略処理（text-overflow: ellipsis）を無効化します。 */
.am-post-tag { display: inline-block; color: var(--am-text-secondary); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; vertical-align: bottom; }
.am-card-title { font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin: 0 0 1rem 0; color: var(--am-text-main); }
.am-card-excerpt { color: #64748b; font-size: 0.95rem; line-height: 1.6; flex-grow: 1; margin-bottom: 1.5rem; }

.am-card-footer { display: flex; justify-content: space-between; align-items: center; pt-top: 1rem; border-top: 1px solid var(--am-border); padding-top: 1rem; }
.am-btn-text { color: var(--am-primary); font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; transition: var(--am-transition-smooth); }
.am-card-article:hover .am-btn-text { color: var(--am-primary-hover); gap: 4px; }
.am-card-date { color: #94a3b8; font-size: 0.85rem; }

/* --- Sidebar & Widget Styles --- */

.am-sidebar {
  padding: 2rem 0;
}

/* WordPress標準の .widget クラスも包含 */
.am-widget, .widget {
  background: var(--am-surface);
  border-radius: var(--am-radius-md);
  padding: 2rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow-md);
  transition: all 0.4s var(--am-transition-smooth);
  list-style: none;
}

.am-widget:hover, .widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ウィジェット内のタイトル装飾 */
.am-widget__title, .widget-title, .widget h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--am-primary);
  color: var(--am-text-primary);
  position: relative;
}

.am-widget__title::after, .widget-title::after, .widget h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--am-accent);
}

/* ウィジェット内のリスト装飾 */
.am-widget ul, .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.am-widget li, .widget li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--am-border);
  color: var(--am-text-secondary);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.am-widget li:last-child, .widget li:last-child {
  border-bottom: none;
}

.am-widget a, .widget a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.am-widget a:hover, .widget a:hover {
  color: var(--am-primary);
  padding-left: 5px;
}

/* --- Sidebar Style Variants --- */

/* 1. Card (Standard/Forest/Sunset) */
.am-sidebar-style-card .am-widget {
  /* Default handled above */
}

/* 2. Clean (Ocean) */
.am-sidebar-style-clean .am-widget {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--am-border);
  border-radius: 0;
  box-shadow: none;
  padding: 1.5rem 0;
}

/* 3. Soft Card (Sakura) */
.am-sidebar-style-soft-card .am-widget {
  border-radius: 40px;
  border: none;
  box-shadow: 0 15px 40px rgba(0,0,0,0.04);
}

/* 4. Glass (Lavender/Glass) */
.am-sidebar-style-glass .am-widget {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* 5. Minimal (Nordic/Minimal) */
.am-sidebar-style-minimal .am-widget {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 1rem 0;
}
.am-sidebar-style-minimal .am-widget__title {
  border-bottom: 1px solid var(--am-text-primary);
}

/* 6. Retro Box (Retro) */
.am-sidebar-style-retro-box .am-widget {
  background: #fff;
  border: 3px solid var(--am-text-primary);
  box-shadow: 10px 10px 0px var(--am-primary);
  border-radius: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .am-single-article { padding: 1.5rem; border-radius: var(--am-radius-default); }
    .am-entry-title { font-size: 2rem; }
    .am-post-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   AffiliMax Premium Blocks (Phase 3)
   ========================================================================== */

/* 1. AIエキスパート・吹き出し (Expert Voice) */
.am-expert-bubble {
    display: flex;
    gap: 20px;
    margin-bottom: 2.5rem;
    align-items: flex-start;
}

.am-expert-bubble__avatar {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
}

.am-expert-bubble__avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 2px solid var(--am-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.am-expert-bubble__name {
    font-size: 11px;
    font-weight: 700;
    color: var(--am-text-secondary);
    line-height: 1.2;
}

.am-expert-bubble__content {
    position: relative;
    background: var(--am-surface);
    border: 1px solid var(--am-border);
    padding: 1.5rem;
    border-radius: 18px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--am-text-primary);
    box-shadow: var(--am-shadow-sm);
}

/* 吹き出しの三角部分 */
.am-expert-bubble__content::before {
    content: "";
    position: absolute;
    top: 20px;
    left: -8px;
    width: 16px;
    height: 16px;
    background: var(--am-surface);
    border-left: 1px solid var(--am-border);
    border-bottom: 1px solid var(--am-border);
    transform: rotate(45deg);
}

.am-expert-bubble--ai .am-expert-bubble__content {
    background: linear-gradient(135deg, var(--am-bg) 0%, var(--am-surface) 100%);
    border-color: var(--am-primary);
}

/* 2. 商品CTAパネル (Conversion Panel) */
.am-cta-panel {
    background: var(--am-surface);
    border: 2px solid var(--am-primary);
    border-radius: var(--am-radius-large);
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--am-shadow-lg);
}

.am-cta-panel::before {
    content: "SPECIAL OFFER";
    position: absolute;
    top: 10px;
    left: -35px;
    background: var(--am-primary);
    color: #fff;
    padding: 4px 40px;
    font-size: 10px;
    font-weight: 800;
    transform: rotate(-45deg);
}

.am-cta-panel__title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--am-text-primary);
}

.am-cta-panel__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--am-primary);
    margin-bottom: 1.5rem;
}

.am-cta-panel__price span {
    font-size: 1rem;
    color: var(--am-text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.am-cta-panel .am-btn {
    width: 100%;
    max-width: 300px;
    padding: 1.25rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .am-expert-bubble { gap: 12px; }
    .am-expert-bubble__avatar { width: 48px; }
    .am-expert-bubble__avatar img { width: 48px; height: 48px; }
    .am-cta-panel { padding: 1.5rem; }
}

/* 3. スマート比較表 (Smart Comparison Table) */
.am-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 3rem 0;
    border-radius: var(--am-radius-lg);
    overflow: hidden;
    border: 1px solid var(--am-border);
    background: var(--am-surface);
}

.am-comparison-table th, 
.am-comparison-table td {
    padding: 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--am-border);
    border-right: 1px solid var(--am-border);
}

.am-comparison-table th:last-child, 
.am-comparison-table td:last-child {
    border-right: none;
}

.am-comparison-table thead th {
    background: var(--am-bg-alt);
    font-weight: 700;
    color: var(--am-text-primary);
}

.am-comparison-table tr:last-child td {
    border-bottom: none;
}

.am-comparison-table__recommend {
    background: var(--am-bg-alt) !important;
    position: relative;
}

.am-comparison-table__recommend::after {
    content: "RECOMMEND";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--am-primary);
    color: #fff;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 0 0 4px 4px;
    font-weight: 800;
}

/* 4. スマート・プロセス (Success Steps) */
.am-steps {
    list-style: none;
    padding: 0;
    margin: 3rem 0;
}

.am-step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    position: relative;
    padding-bottom: 2rem;
}

.am-step-item:last-child {
    padding-bottom: 0;
}

.am-step-item:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 20px;
    width: 2px;
    height: calc(100% - 40px);
    background: var(--am-border);
}

.am-step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--am-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.am-step-content {
    padding-top: 6px;
}

.am-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--am-text-primary);
}

@media (max-width: 768px) {
    /* モバイル比較表をカード形式にトランスフォーム */
    .am-comparison-table, 
    .am-comparison-table thead, 
    .am-comparison-table tbody, 
    .am-comparison-table th, 
    .am-comparison-table td, 
    .am-comparison-table tr {
        display: block;
    }
    
    .am-comparison-table thead {
        display: none;
    }
    
    .am-comparison-table tr {
        border-bottom: 2px solid var(--am-primary);
        margin-bottom: 2rem;
        padding: 1rem;
    }
    
    .am-comparison-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        border-bottom: 1px solid var(--am-border);
        text-align: right;
        padding: 0.75rem 0;
    }
    
    .am-comparison-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--am-text-secondary);
        text-align: left;
    }
}

/* =============================================================================
   スキン別 構造変更CSS v2
   全10スキンの骨格をCSSだけで根本から変える
   ============================================================================= */

/* ── OCEAN: ビジネス・プロ ──
   2段ヘッダー / カード左ボーダー / フッター中央 / 角丸ゼロ */
.am-skin-ocean .am-header { border-bottom:3px solid var(--am-primary); box-shadow:none; backdrop-filter:none; height:auto; padding:0; }
.am-skin-ocean .am-header__inner { flex-wrap:wrap; justify-content:center; padding:0 var(--am-gap-xl); }
.am-skin-ocean .am-header__logo { width:100%; text-align:center; padding:0.75rem 0 0.5rem; font-size:1.8rem; font-weight:900; letter-spacing:-0.03em; background:none; -webkit-text-fill-color:var(--am-primary); border-bottom:1px solid var(--am-border); }
.am-skin-ocean .am-nav { width:100%; justify-content:center; padding:0.5rem 0; gap:var(--am-gap-2xl); }
.am-skin-ocean .am-nav li a { font-weight:700; text-transform:uppercase; font-size:0.78rem; letter-spacing:0.08em; padding:0.3rem 0; border-bottom:2px solid transparent; }
.am-skin-ocean .am-nav li a:hover { border-bottom-color:var(--am-primary); }
.am-skin-ocean .am-card { border-radius:0; border:1px solid var(--am-border); border-left:5px solid var(--am-primary); box-shadow:0 1px 3px rgba(0,0,0,0.06); }
.am-skin-ocean .am-card:hover { border-left-color:var(--am-accent); box-shadow:0 4px 12px rgba(0,0,0,0.1); transform:none; }
.am-skin-ocean .am-card img { border-radius:0; }
.am-skin-ocean .am-single-article { border-radius:0; border-top:5px solid var(--am-primary); box-shadow:0 1px 3px rgba(0,0,0,0.08); }
.am-skin-ocean .am-entry-title { text-align:left; }
.am-skin-ocean .am-entry-header { text-align:left; }
.am-skin-ocean .am-footer { border-top:3px solid var(--am-primary); }
.am-skin-ocean .am-footer__inner { grid-template-columns:1fr 1fr 1fr; text-align:left; }
.am-skin-ocean .am-btn--primary,.am-skin-ocean .am-btn { border-radius:4px; }
.am-skin-ocean .am-badge--primary { border-radius:2px; }

/* ── SAKURA: ふわふわ ──
   浮遊ピルヘッダー / 枠なし丸カード / 微回転ホバー / 上丸フッター */
.am-skin-sakura .am-header { margin:1rem 1.5rem 0; border-radius:999px; border:none; box-shadow:0 8px 30px rgba(236,72,153,0.1); height:auto; padding:0.4rem 1rem; }
.am-skin-sakura .am-header__inner { justify-content:center; gap:var(--am-gap-xl); }
.am-skin-sakura .am-header__logo { font-size:1.3rem; font-weight:700; background:none; -webkit-text-fill-color:var(--am-primary); }
.am-skin-sakura .am-nav li a { font-size:0.85rem; font-weight:600; background:rgba(236,72,153,0.06); padding:0.3rem 0.8rem; border-radius:999px; }
.am-skin-sakura .am-nav li a:hover { background:rgba(236,72,153,0.15); }
.am-skin-sakura .am-card { border:none; border-radius:32px; box-shadow:0 8px 25px rgba(236,72,153,0.08); }
.am-skin-sakura .am-card:hover { box-shadow:0 16px 40px rgba(236,72,153,0.16); transform:translateY(-6px) rotate(-1deg); }
.am-skin-sakura .am-card img { border-radius:24px; margin:0.5rem; }
.am-skin-sakura .am-single-article { border-radius:40px; border:none; box-shadow:0 12px 50px rgba(236,72,153,0.06); padding:3rem; }
.am-skin-sakura .am-entry-title { font-size:2rem; }
.am-skin-sakura .am-badge--primary { border-radius:999px; background:rgba(236,72,153,0.12); font-size:0.75rem; }
.am-skin-sakura .am-footer { border-top:none; border-radius:48px 48px 0 0; margin-top:3rem; padding-top:4rem; }
.am-skin-sakura .am-footer__copy { justify-content:center; }
.am-skin-sakura .am-btn--primary { border-radius:999px; box-shadow:0 6px 20px rgba(236,72,153,0.25); font-weight:700; }

/* ── FOREST: ネイチャー ──
   グラデ上ライン / 太左ボーダーカード / 緑グラデフッター / 丸ボタン */
.am-skin-forest .am-header { border-bottom:none; box-shadow:none; position:sticky; }
.am-skin-forest .am-header::before { content:''; position:absolute; top:0; left:0; right:0; height:5px; background:linear-gradient(90deg,#15803d,#4ade80,#a3e635); }
.am-skin-forest .am-header__logo { background:none; -webkit-text-fill-color:#15803d; font-weight:900; font-size:1.5rem; }
.am-skin-forest .am-nav li a { font-weight:700; color:#15803d !important; }
.am-skin-forest .am-card { border-radius:16px; border:2px solid #bbf7d0; border-left:8px solid #15803d; }
.am-skin-forest .am-card:hover { border-color:#15803d; box-shadow:0 8px 0 rgba(21,128,61,0.1); transform:translateY(-3px); }
.am-skin-forest .am-single-article { border-radius:20px; border:2px solid #bbf7d0; border-top:8px solid #15803d; }
.am-skin-forest .am-footer { border-top:8px solid #15803d; background:linear-gradient(180deg,#dcfce7 0%,#f0fdf4 100%) !important; }
.am-skin-forest .am-btn--primary { border-radius:12px; font-weight:800; background:#15803d; border:2px solid #14532d; }

/* ── NORDIC: 極限ミニマル ──
   テキストロゴ大文字 / 影ゼロ枠ゼロ / 1カラム(サイドバーなし) / 広い余白 */
.am-skin-nordic .am-header { height:auto; padding:2.5rem 0; border-bottom:1px solid #e2e8f0; box-shadow:none; backdrop-filter:none; }
.am-skin-nordic .am-header__logo { font-size:0.9rem; font-weight:300; text-transform:uppercase; letter-spacing:0.35em; background:none; -webkit-text-fill-color:#0f172a; }
.am-skin-nordic .am-nav { gap:var(--am-gap-2xl); }
.am-skin-nordic .am-nav li a { font-weight:300; text-transform:uppercase; letter-spacing:0.12em; font-size:0.75rem; color:#64748b !important; }
.am-skin-nordic .am-nav li a:hover { color:#0f172a !important; }
.am-skin-nordic .am-single-container { grid-template-columns:1fr !important; max-width:700px; }
.am-skin-nordic .am-sidebar { display:none !important; }
.am-skin-nordic .am-container.am-single-container { grid-template-columns:1fr !important; max-width:700px; }
.am-skin-nordic .am-container.am-single-container > aside { display:none !important; }
.am-skin-nordic .am-card { border:none; border-radius:0; box-shadow:none; border-bottom:1px solid #e2e8f0; padding:var(--am-gap-2xl) 0; background:transparent; }
.am-skin-nordic .am-card:hover { box-shadow:none; border-color:#0f172a; transform:none; background:transparent; }
.am-skin-nordic .am-card img { border-radius:0; }
.am-skin-nordic .am-single-article { border-radius:0; box-shadow:none; padding:0; background:transparent; border:none; }
.am-skin-nordic .am-entry-title { font-size:2.8rem; font-weight:300; letter-spacing:0.05em; }
.am-skin-nordic .am-footer { border-top:1px solid #e2e8f0; padding:2rem 0; background:#fff !important; }
.am-skin-nordic .am-footer__inner { grid-template-columns:1fr; text-align:center; }
.am-skin-nordic .am-footer__grid { display:none; }
.am-skin-nordic .am-footer__brand { align-items:center; }
.am-skin-nordic .am-btn--primary { border-radius:0; border:1.5px solid #334155; background:transparent; color:#334155; font-weight:400; letter-spacing:0.1em; text-transform:uppercase; font-size:0.8rem; }
.am-skin-nordic .am-btn--primary:hover { background:#334155; color:#fff; }

/* ── CANDY: ポップ・カラフル ──
   グラデーションヘッダー下線 / 2色ボーダーカード / スケールホバー / カラフルバッジ */
.am-skin-candy .am-header { border-bottom:none; box-shadow:0 4px 20px rgba(139,92,246,0.08); }
.am-skin-candy .am-header::after { content:''; position:absolute; bottom:0; left:0; right:0; height:4px; background:linear-gradient(90deg,#8b5cf6,#06b6d4,#ec4899,#f59e0b); }
.am-skin-candy .am-header__logo { background:linear-gradient(135deg,#8b5cf6,#06b6d4); -webkit-background-clip:text; -webkit-text-fill-color:transparent; font-weight:900; }
.am-skin-candy .am-nav li a { font-weight:700; font-size:0.85rem; }
.am-skin-candy .am-card { border-radius:24px; border:2px solid #e9d5ff; box-shadow:0 6px 20px rgba(139,92,246,0.08); position:relative; overflow:hidden; }
.am-skin-candy .am-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:linear-gradient(90deg,#8b5cf6,#06b6d4); }
.am-skin-candy .am-card:hover { transform:translateY(-6px) scale(1.01); box-shadow:0 16px 40px rgba(139,92,246,0.15); border-color:#c4b5fd; }
.am-skin-candy .am-single-article { border-radius:28px; border:2px solid #e9d5ff; position:relative; }
.am-skin-candy .am-single-article::before { content:''; position:absolute; top:0; left:0; right:0; height:6px; border-radius:28px 28px 0 0; background:linear-gradient(90deg,#8b5cf6,#06b6d4,#ec4899); }
.am-skin-candy .am-badge--primary { background:linear-gradient(135deg,rgba(139,92,246,0.15),rgba(6,182,212,0.15)); border-radius:999px; font-weight:700; }
.am-skin-candy .am-footer { border-top:none; position:relative; }
.am-skin-candy .am-footer::before { content:''; display:block; height:4px; background:linear-gradient(90deg,#8b5cf6,#06b6d4,#ec4899,#f59e0b); }
.am-skin-candy .am-btn--primary { background:linear-gradient(135deg,#8b5cf6,#06b6d4); border:none; border-radius:999px; box-shadow:0 6px 20px rgba(139,92,246,0.25); font-weight:700; }

/* ── RETRO: ブルータリズム ──
   太黒枠ヘッダー / ハードシャドウカード / 大文字ロゴ / 黄色フッター */
.am-skin-retro .am-header { border:none; border-bottom:5px solid #000; box-shadow:none; backdrop-filter:none; height:auto; padding:0.6rem 0; }
.am-skin-retro .am-header__logo { font-size:2.2rem; font-weight:900; text-transform:uppercase; letter-spacing:-0.03em; background:none; -webkit-text-fill-color:#000; }
.am-skin-retro .am-nav li a { font-weight:900; text-transform:uppercase; font-size:0.8rem; letter-spacing:0.05em; border:3px solid transparent; padding:0.25rem 0.5rem; }
.am-skin-retro .am-nav li a:hover { border-color:#000; background:#facc15; }
.am-skin-retro .am-card { border:4px solid #000; border-radius:0; box-shadow:8px 8px 0 #000; }
.am-skin-retro .am-card:hover { box-shadow:14px 14px 0 #000; transform:translate(-3px,-3px); border-color:#000; }
.am-skin-retro .am-card img { border-radius:0; border-bottom:4px solid #000; }
.am-skin-retro .am-single-article { border:5px solid #000; box-shadow:12px 12px 0 #000; border-radius:0; }
.am-skin-retro .am-badge--primary { border:3px solid #000; border-radius:0; background:#facc15; color:#000; font-weight:900; text-transform:uppercase; }
.am-skin-retro .am-footer { border-top:5px solid #000; background:#facc15 !important; color:#000; }
.am-skin-retro .am-footer__logo,.am-skin-retro .am-footer__desc,.am-skin-retro .am-footer-menu a,.am-skin-retro .am-footer__copy,.am-skin-retro .am-footer__copy p { color:#000 !important; }
.am-skin-retro .am-btn--primary { border:4px solid #000; border-radius:0; box-shadow:5px 5px 0 #000; background:#ef4444; color:#fff; font-weight:900; text-transform:uppercase; letter-spacing:0.05em; }
.am-skin-retro .am-btn--primary:hover { box-shadow:8px 8px 0 #000; transform:translate(-2px,-2px); }
.am-skin-retro .am-hamburger span { background:#000; height:3px; }

/* ── SUNSET: グラマー・マガジン ──
   グラデーション装飾 / カード下部グラデライン / リッチな影 / 太い見出し */
.am-skin-sunset .am-header { border-bottom:none; box-shadow:0 4px 20px rgba(225,29,72,0.06); }
.am-skin-sunset .am-header::after { content:''; position:absolute; bottom:0; left:5%; right:5%; height:3px; border-radius:999px; background:linear-gradient(90deg,#e11d48,#f59e0b,#e11d48); }
.am-skin-sunset .am-header__logo { background:linear-gradient(135deg,#e11d48,#f59e0b); -webkit-background-clip:text; -webkit-text-fill-color:transparent; font-weight:900; font-size:1.7rem; }
.am-skin-sunset .am-card { border-radius:20px; border:none; overflow:hidden; position:relative; box-shadow:0 8px 25px rgba(225,29,72,0.06); }
.am-skin-sunset .am-card::after { content:''; position:absolute; bottom:0; left:0; right:0; height:5px; background:linear-gradient(90deg,#e11d48,#f59e0b); }
.am-skin-sunset .am-card:hover { transform:translateY(-8px); box-shadow:0 20px 50px rgba(225,29,72,0.12); }
.am-skin-sunset .am-single-article { border-radius:24px; border:none; border-top:5px solid transparent; border-image:linear-gradient(90deg,#e11d48,#f59e0b) 1; box-shadow:0 8px 30px rgba(225,29,72,0.06); }
.am-skin-sunset .am-entry-title { font-size:2.5rem; font-weight:800; }
.am-skin-sunset .am-footer { border-top:none; }
.am-skin-sunset .am-footer::before { content:''; display:block; height:5px; background:linear-gradient(90deg,#e11d48,#f59e0b,#e11d48); }
.am-skin-sunset .am-btn--primary { background:linear-gradient(135deg,#e11d48,#be123c); border:none; border-radius:12px; box-shadow:0 6px 25px rgba(225,29,72,0.25); font-weight:800; }

/* ── LAVENDER: ドリーミー ──
   半透明ヘッダー / ぼかしカード / 紫グロー / 浮遊感 */
.am-skin-lavender .am-header { background:rgba(255,255,255,0.5) !important; backdrop-filter:blur(24px); border-bottom:1px solid rgba(168,85,247,0.08); box-shadow:0 8px 30px rgba(168,85,247,0.04); }
.am-skin-lavender .am-header__logo { background:linear-gradient(135deg,#a855f7,#ec4899); -webkit-background-clip:text; -webkit-text-fill-color:transparent; font-weight:800; }
.am-skin-lavender .am-card { background:rgba(255,255,255,0.5); backdrop-filter:blur(12px); border:1px solid rgba(168,85,247,0.12); border-radius:28px; }
.am-skin-lavender .am-card:hover { background:rgba(255,255,255,0.75); box-shadow:0 12px 40px rgba(168,85,247,0.12); border-color:rgba(168,85,247,0.25); transform:translateY(-5px); }
.am-skin-lavender .am-single-article { background:rgba(255,255,255,0.5); backdrop-filter:blur(12px); border:1px solid rgba(168,85,247,0.08); border-radius:32px; }
.am-skin-lavender .am-footer { background:rgba(245,243,255,0.7) !important; backdrop-filter:blur(16px); border-top:1px solid rgba(168,85,247,0.08); }
.am-skin-lavender .am-btn--primary { background:linear-gradient(135deg,#a855f7,#c084fc); border:none; border-radius:999px; box-shadow:0 6px 25px rgba(168,85,247,0.25); }
.am-skin-lavender .am-badge--primary { background:rgba(168,85,247,0.1); border-radius:999px; }

/* ── MINIMAL: エッセンシャル ──
   装飾完全排除 / 1カラム狭幅 / サイドバーなし / タイポ重視 / Medium風 */
.am-skin-minimal .am-header { border-bottom:none; box-shadow:none; backdrop-filter:none; height:auto; padding:2rem 0; }
.am-skin-minimal .am-header__logo { font-size:1.1rem; font-weight:700; letter-spacing:-0.04em; background:none; -webkit-text-fill-color:#171717; }
.am-skin-minimal .am-nav li a { font-weight:400; font-size:0.85rem; color:#525252 !important; }
.am-skin-minimal .am-nav li a:hover { color:#171717 !important; text-decoration:underline; }
.am-skin-minimal .am-single-container { grid-template-columns:1fr !important; max-width:680px; }
.am-skin-minimal .am-sidebar { display:none !important; }
.am-skin-minimal .am-container.am-single-container { grid-template-columns:1fr !important; max-width:680px; }
.am-skin-minimal .am-container.am-single-container > aside { display:none !important; }
.am-skin-minimal .am-card { border:none; border-radius:0; box-shadow:none; padding:var(--am-gap-2xl) 0; border-bottom:1px solid #e5e5e5; background:transparent; }
.am-skin-minimal .am-card:hover { box-shadow:none; transform:none; background:transparent; border-color:#171717; }
.am-skin-minimal .am-card img { border-radius:0; }
.am-skin-minimal .am-single-article { border-radius:0; box-shadow:none; background:transparent; padding:0; border:none; }
.am-skin-minimal .am-entry-title { font-size:3.2rem; font-weight:700; letter-spacing:-0.04em; line-height:1.15; }
.am-skin-minimal .am-entry-header { text-align:left; margin-bottom:3rem; }
.am-skin-minimal .am-entry-meta { justify-content:flex-start; }
.am-skin-minimal .am-footer { border-top:1px solid #e5e5e5; padding:1.5rem 0; background:#fff !important; }
.am-skin-minimal .am-footer__inner { grid-template-columns:1fr; text-align:center; }
.am-skin-minimal .am-footer__grid { display:none; }
.am-skin-minimal .am-footer__copy { justify-content:center; border-top:none; margin-top:0; padding-top:0; }
.am-skin-minimal .am-btn--primary { background:#171717; color:#fff; border-radius:0; border:none; font-weight:600; }
.am-skin-minimal .am-btn--primary:hover { background:#404040; }



/* =============================================================================
   レイアウトバリエーション
   ヘッダー5種 / フッター5種 / モバイルメニュー5種
   スキンとは独立して動作し、色はCSS変数でスキンに追従する
   ============================================================================= */

/* ━━━━ ヘッダー ━━━━ */

/* 1. header-classic: デフォルト（ロゴ左・ナビ右）— 特にCSSなし */

/* 2. header-center: ロゴ中央・ナビ下段 */
.am-header-center .am-header { height:auto; padding:0; }
.am-header-center .am-header__inner { flex-wrap:wrap; justify-content:center; padding:0 var(--am-gap-xl); }
.am-header-center .am-header__logo { width:100%; text-align:center; padding:0.8rem 0 0.4rem; border-bottom:1px solid var(--am-border); }
.am-header-center .am-nav { width:100%; justify-content:center; padding:0.5rem 0; gap:var(--am-gap-xl); }
.am-header-center .am-hamburger { position:absolute; right:var(--am-gap-xl); top:50%; transform:translateY(-50%); }

/* 3. header-split: ナビ左右分割・ロゴ中央 */
.am-header-split .am-header { height:auto; padding:0.8rem 0; }
.am-header-split .am-header__inner { justify-content:center; position:relative; }
.am-header-split .am-header__logo { order:2; margin:0 var(--am-gap-2xl); }
.am-header-split .am-nav { display:flex; }
.am-header-split .am-nav li:nth-child(-n+3) { order:1; }
.am-header-split .am-nav li:nth-child(n+4) { order:3; }

/* 4. header-minimal: ロゴ左・PC時もハンバーガーのみ */
.am-header-minimal .am-nav { display:none !important; }
.am-header-minimal .am-hamburger { display:flex !important; }
.am-header-minimal .am-header { height:auto; padding:0.8rem 0; }

/* 5. header-bar: 横一列フルワイド中央寄せ */
.am-header-bar .am-header { height:auto; padding:0.6rem 0; border-bottom:2px solid var(--am-primary); }
.am-header-bar .am-header__inner { justify-content:center; gap:var(--am-gap-2xl); }
.am-header-bar .am-header__logo { font-size:1.1rem; }
.am-header-bar .am-nav { gap:var(--am-gap-lg); }
.am-header-bar .am-nav li a { font-size:0.82rem; font-weight:600; padding:0.3rem 0.6rem; border-radius:6px; transition:background 0.2s; }
.am-header-bar .am-nav li a:hover { background:var(--am-bg-alt); }

/* ━━━━ フッター ━━━━ */

/* 1. footer-classic: デフォルト — 特にCSSなし */

/* 2. footer-centered: 全要素中央揃え
   Why: ウィジェットの個数が少ない場合でも偏らないようauto-fitカラムに最適化します */
.am-footer-centered .am-footer__inner { grid-template-columns:1fr; text-align:center; }
.am-footer-centered .am-footer__brand { align-items:center; }
.am-footer-centered .am-footer__desc { max-width:none; }
.am-footer-centered .am-footer__grid { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); justify-content:center; justify-items:center; text-align:center; }
.am-footer-centered .am-footer__copy { justify-content:center; }

/* 3. footer-minimal: コピーライトのみ */
.am-footer-minimal .am-footer__inner { display:none; }
.am-footer-minimal .am-footer { padding:var(--am-gap-lg) 0; }
.am-footer-minimal .am-footer__copy { margin-top:0; padding-top:0; border-top:none; justify-content:center; }

/* 4. footer-columns: 4カラム均等グリッド
   Why: ブランドエリアを1列分、残りのウィジェットエリアを3列スパンさせて等幅に並べます */
.am-footer-columns .am-footer__inner { grid-template-columns:repeat(4,1fr); gap:var(--am-gap-xl); }
.am-footer-columns .am-footer__brand { grid-column:span 1; }
.am-footer-columns .am-footer__grid { grid-column:span 3; grid-template-columns:repeat(3,1fr); gap:var(--am-gap-md); }

/* 5. footer-banner: 大ブランドセクション + 薄いバー */
.am-footer-banner .am-footer__inner { grid-template-columns:1fr; text-align:center; gap:var(--am-gap-xl); }
.am-footer-banner .am-footer__logo { font-size:2rem; }
.am-footer-banner .am-footer__desc { max-width:none; font-size:1rem; }
.am-footer-banner .am-footer__grid { display:none; }
.am-footer-banner .am-footer__copy { background:var(--am-bg-alt); margin:0 calc(-1 * var(--am-gap-xl)); padding:var(--am-gap-md) var(--am-gap-xl); border-top:none; justify-content:center; border-radius:0; }

/* ━━━━ モバイルメニュー ━━━━ */

/* 1. mobile-slide-right: 右からスライド（デフォルト）
   Why: topを0にすることで、ヘッダーが引っ込んだ際やhd-pillスキン時の見切れを完全に解消します。 */
@media (max-width:768px) {
  .am-mobile-slide-right .am-nav-mobile.is-open {
    position:fixed; top:0; right:0; bottom:0; left:auto;
    width:75%; max-width:320px;
    background:var(--am-bg); padding:calc(var(--am-header-h) + var(--am-gap-xl)) var(--am-gap-xl) var(--am-gap-xl); z-index:99;
    flex-direction:column; gap:var(--am-gap-lg);
    box-shadow:-10px 0 30px rgba(0,0,0,0.1);
    animation:slideFromRight 0.3s ease;
    overflow-y:auto;
  }
  @keyframes slideFromRight { from { transform:translateX(100%); } to { transform:translateX(0); } }
}

/* 2. mobile-slide-left: 左からスライド
   Why: スライド右と同様に、ヘッダーに連動しないようtop:0かつスクロール可能にします。 */
@media (max-width:768px) {
  .am-mobile-slide-left .am-nav-mobile.is-open {
    position:fixed; top:0; left:0; bottom:0; right:auto;
    width:75%; max-width:320px;
    background:var(--am-bg); padding:calc(var(--am-header-h) + var(--am-gap-xl)) var(--am-gap-xl) var(--am-gap-xl); z-index:99;
    flex-direction:column; gap:var(--am-gap-lg);
    box-shadow:10px 0 30px rgba(0,0,0,0.1);
    animation:slideFromLeft 0.3s ease;
    overflow-y:auto;
  }
  @keyframes slideFromLeft { from { transform:translateX(-100%); } to { transform:translateX(0); } }
}

/* 3. mobile-fullscreen: 全画面オーバーレイ
   Why: z-indexを99にし、ハンバーガーボタン（z-index: 100）が隠れないようにして閉じる操作を維持します。 */
@media (max-width:768px) {
  .am-mobile-fullscreen .am-nav-mobile.is-open {
    position:fixed; inset:0;
    background:var(--am-bg); z-index:99;
    flex-direction:column; justify-content:center; align-items:center;
    gap:var(--am-gap-2xl); padding:calc(var(--am-header-h) + var(--am-gap-xl)) var(--am-gap-2xl) var(--am-gap-2xl);
    animation:fadeInOverlay 0.3s ease;
    overflow-y:auto;
  }
  .am-mobile-fullscreen .am-nav-mobile.is-open li a { font-size:1.5rem; font-weight:700; }
  @keyframes fadeInOverlay { from { opacity:0; } to { opacity:1; } }
}

/* 4. mobile-bottom-sheet: 下からスライド */
@media (max-width:768px) {
  .am-mobile-bottom-sheet .am-nav-mobile.is-open {
    position:fixed; bottom:0; left:0; right:0; top:auto;
    max-height:60vh;
    background:var(--am-bg); z-index:99;
    flex-direction:column; gap:var(--am-gap-lg);
    padding:var(--am-gap-xl) var(--am-gap-xl) var(--am-gap-3xl);
    border-radius:24px 24px 0 0;
    box-shadow:0 -10px 30px rgba(0,0,0,0.1);
    animation:slideFromBottom 0.3s ease;
    overflow-y:auto;
  }
  .am-mobile-bottom-sheet .am-nav-mobile.is-open::before {
    content:''; display:block; width:40px; height:4px;
    background:var(--am-border); border-radius:999px;
    margin:0 auto var(--am-gap-md);
  }
  @keyframes slideFromBottom { from { transform:translateY(100%); } to { transform:translateY(0); } }
}

/* 5. mobile-dropdown: ヘッダー下に展開
   Why: position:fixed に変更し、ヘッダー直下（top: var(--am-header-h)）に固定追従させます。 */
@media (max-width:768px) {
  .am-mobile-dropdown .am-nav-mobile.is-open {
    position:fixed; top:var(--am-header-h) !important; left:0; right:0; bottom:auto; height:auto; max-height:80vh;
    background:var(--am-surface); z-index:99;
    flex-direction:column; gap:0;
    padding:0;
    border-bottom:2px solid var(--am-primary);
    box-shadow:0 10px 20px rgba(0,0,0,0.08);
    animation:dropDown 0.25s ease;
    overflow-y:auto;
  }
  .am-mobile-dropdown .am-nav-mobile.is-open li a { display:block; padding:0.8rem var(--am-gap-xl); border-bottom:1px solid var(--am-border); }
  .am-mobile-dropdown .am-nav-mobile.is-open li:last-child a { border-bottom:none; }
  @keyframes dropDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
}



/* =============================================================================
   デザインバリエーション（装飾スタイル）
   ヘッダー10種 / フッター10種 / モバイルメニュー10種
   レイアウト（配置）とは独立して動作し、色はCSS変数でスキンに追従する
   ============================================================================= */

/* ━━━━ ヘッダーデザイン ━━━━ */

/* hd-clean: デフォルト — 特にCSSなし（ベースのヘッダーCSS適用） */

/* hd-bordered: 下線のみ・影なし */
.am-hd-bordered .am-header { box-shadow:none; backdrop-filter:none; border-bottom:2px solid var(--am-border); }

/* hd-gradient: プライマリ→アクセントのグラデーション背景 */
.am-hd-gradient .am-header { background:linear-gradient(135deg, var(--am-primary), var(--am-accent)) !important; border-bottom:none; }
.am-hd-gradient .am-header__logo { -webkit-text-fill-color:#fff !important; background:none !important; }
.am-hd-gradient .am-nav li a { color:rgba(255,255,255,0.85) !important; }
.am-hd-gradient .am-nav li a:hover { color:#fff !important; }
.am-hd-gradient .am-hamburger span { background:#fff; }

/* hd-glass: 半透明ぼかし */
.am-hd-glass .am-header { background:rgba(255,255,255,0.4) !important; backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); border-bottom:1px solid rgba(255,255,255,0.3); box-shadow:0 4px 30px rgba(0,0,0,0.05); }

/* hd-shadow: 深い影で浮遊感 */
.am-hd-shadow .am-header { border-bottom:none; box-shadow:0 8px 40px rgba(0,0,0,0.12); }

/* hd-pill: 丸角フローティング */
.am-hd-pill .am-header { margin:0.75rem 1.5rem 0; border-radius:999px; border-bottom:none; box-shadow:0 6px 25px rgba(0,0,0,0.08); height:auto; padding:0.4rem 0.5rem; }

/* hd-underline: 太いプライマリカラーの下線 */
.am-hd-underline .am-header { border-bottom:4px solid var(--am-primary); box-shadow:none; backdrop-filter:none; }

/* hd-two-tone: 上部にカラーバー */
.am-hd-two-tone .am-header { border-bottom:1px solid var(--am-border); box-shadow:none; }
.am-hd-two-tone .am-header::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:linear-gradient(90deg, var(--am-primary), var(--am-accent)); }

/* hd-flat: 背景色のみ・一切の装飾なし */
.am-hd-flat .am-header { box-shadow:none; border-bottom:none; backdrop-filter:none; }

/* hd-neon: プライマリカラーのネオングロー */
.am-hd-neon .am-header { border-bottom:2px solid var(--am-primary); box-shadow:0 4px 20px color-mix(in srgb, var(--am-primary) 30%, transparent); }
.am-hd-neon .am-header__logo { text-shadow:0 0 12px color-mix(in srgb, var(--am-primary) 50%, transparent); }

/* ━━━━ フッターデザイン ━━━━ */

/* fd-clean: デフォルト — 特にCSSなし */

/* fd-dark: テキスト色反転の濃い背景 */
.am-fd-dark .am-footer { background:var(--am-text-primary) !important; color:rgba(255,255,255,0.7); border-top:none; }
.am-fd-dark .am-footer__logo { color:#fff !important; }
.am-fd-dark .am-footer__desc,.am-fd-dark .am-footer-menu a,.am-fd-dark .am-footer__copy,.am-fd-dark .am-footer__copy p { color:rgba(255,255,255,0.6) !important; }
.am-fd-dark .am-footer-menu a:hover { color:#fff !important; }
.am-fd-dark .am-footer__copy { border-top-color:rgba(255,255,255,0.1); }

/* fd-gradient: 上から下へグラデーション */
.am-fd-gradient .am-footer { background:linear-gradient(180deg, var(--am-bg-alt), var(--am-footer-bg)) !important; border-top:none; }

/* fd-bordered: 太い上線 */
.am-fd-bordered .am-footer { border-top:5px solid var(--am-primary); }

/* fd-glass: 半透明ぼかし */
.am-fd-glass .am-footer { background:rgba(255,255,255,0.5) !important; backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-top:1px solid rgba(255,255,255,0.3); }

/* fd-wave: 上部に波形装飾 */
.am-fd-wave .am-footer { border-top:none; padding-top:5rem; position:relative; }
.am-fd-wave .am-footer::before { content:''; position:absolute; top:-2px; left:0; right:0; height:60px; background:var(--am-bg); clip-path:ellipse(55% 100% at 50% 0%); }

/* fd-stripe: 背景にストライプパターン */
.am-fd-stripe .am-footer { background:repeating-linear-gradient(135deg, var(--am-footer-bg), var(--am-footer-bg) 10px, var(--am-bg-alt) 10px, var(--am-bg-alt) 20px) !important; }

/* fd-rounded: 上部丸角 */
.am-fd-rounded .am-footer { border-top:none; border-radius:40px 40px 0 0; margin-top:2rem; padding-top:3rem; }

/* fd-accent: プライマリカラー背景 */
.am-fd-accent .am-footer { background:var(--am-primary) !important; border-top:none; }
.am-fd-accent .am-footer__logo,.am-fd-accent .am-footer__desc,.am-fd-accent .am-footer-menu a,.am-fd-accent .am-footer__copy,.am-fd-accent .am-footer__copy p { color:rgba(255,255,255,0.9) !important; }
.am-fd-accent .am-footer__copy { border-top-color:rgba(255,255,255,0.2); }

/* fd-minimal-line: 極細の上線のみ */
.am-fd-minimal-line .am-footer { border-top:1px solid var(--am-border); background:transparent !important; padding:var(--am-gap-lg) 0; }

/* ━━━━ モバイルメニューデザイン ━━━━ */
/* モバイルメニューのデザインは .am-nav.is-open に適用される */

/* md-clean: デフォルト — 特にCSSなし */

/* md-dark: 濃い背景・白テキスト */
@media (max-width:768px) {
  .am-md-dark .am-nav.is-open { background:var(--am-text-primary) !important; }
  .am-md-dark .am-nav.is-open li a { color:rgba(255,255,255,0.85) !important; }
  .am-md-dark .am-nav.is-open li a:hover { color:#fff !important; }
}

/* md-glass: 半透明ぼかし */
@media (max-width:768px) {
  .am-md-glass .am-nav.is-open { background:rgba(255,255,255,0.6) !important; backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); }
}

/* md-card: 各リンクがカード型 */
@media (max-width:768px) {
  .am-md-card .am-nav.is-open li a { display:block; background:var(--am-surface); border:1px solid var(--am-border); border-radius:12px; padding:0.8rem 1rem; margin-bottom:0.5rem; font-weight:600; transition:all 0.2s; }
  .am-md-card .am-nav.is-open li a:hover { background:var(--am-bg-alt); border-color:var(--am-primary); }
}

/* md-bordered: 枠線付き */
@media (max-width:768px) {
  .am-md-bordered .am-nav.is-open { border:2px solid var(--am-primary); border-radius:16px; margin:0.5rem; }
  .am-md-bordered .am-nav.is-open li a { border-bottom:1px solid var(--am-border); padding:0.8rem 1rem; }
  .am-md-bordered .am-nav.is-open li:last-child a { border-bottom:none; }
}

/* md-gradient: グラデーション背景 */
@media (max-width:768px) {
  .am-md-gradient .am-nav.is-open { background:linear-gradient(180deg, var(--am-bg), var(--am-bg-alt)) !important; }
}

/* md-accent: プライマリ色背景 */
@media (max-width:768px) {
  .am-md-accent .am-nav.is-open { background:var(--am-primary) !important; }
  .am-md-accent .am-nav.is-open li a { color:rgba(255,255,255,0.9) !important; }
  .am-md-accent .am-nav.is-open li a:hover { color:#fff !important; }
}

/* md-rounded: 各リンクが丸角ボタン型 */
@media (max-width:768px) {
  .am-md-rounded .am-nav.is-open li a { display:inline-block; background:var(--am-bg-alt); border-radius:999px; padding:0.5rem 1.2rem; font-weight:600; font-size:0.9rem; }
  .am-md-rounded .am-nav.is-open li a:hover { background:var(--am-primary); color:#fff; }
  .am-md-rounded .am-nav.is-open { flex-wrap:wrap; justify-content:center; }
}

/* md-divider: 太い区切り線付き */
@media (max-width:768px) {
  .am-md-divider .am-nav.is-open li { border-bottom:2px solid var(--am-border); }
  .am-md-divider .am-nav.is-open li:last-child { border-bottom:none; }
  .am-md-divider .am-nav.is-open li a { display:block; padding:1rem 0; font-size:1rem; font-weight:600; }
}

/* md-large: 大きなリンク */
@media (max-width:768px) {
  .am-md-large .am-nav.is-open { justify-content:center; text-align:center; }
  .am-md-large .am-nav.is-open li a { font-size:1.4rem; font-weight:700; letter-spacing:0.02em; padding:0.6rem 0; }
}

/* =============================================================================
   AffiliMax Modern UI - 検索ウィジェット・ブロックの改善
   Why: 標準の検索ウィジェットおよびGutenberg検索ブロック内の入力欄やボタンの高さが引き伸ばされて巨大化するのを防ぎ、
   高さを42pxに統一してスマートに横並び配置することでプレミアムな質感にするため。
   ============================================================================= */
/* ── アクセシビリティ・スクリーンリーダー専用テキストの非表示化 ── */
/* Why: WordPress標準が出力するスクリーンリーダー用のテキストを画面上で非表示にしつつ、読み上げソフトには認識させるため */
.screen-reader-text {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  word-wrap: normal !important;
}

/* 検索全体およびコンテナ */
.search-form,
.widget_search .search-form,
.widget.widget_search .search-form {
  display: flex !important;
  align-items: center !important;
  gap: var(--am-gap-xs) !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
  height: 42px !important;
  box-sizing: border-box !important;
}

/* Gutenberg検索ブロックのアウターコンテナ */
/* Why: アウター自体をflexにするとラベルと入力欄が横並びになり、入力欄がつぶれる原因になるため通常のブロック要素にする */
.wp-block-search {
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* Gutenberg検索ブロックのラベル */
/* Why: 検索ウィジェット・ブロック上のラベルテキスト「検索」を不要とするユーザー要望に基づき非表示化するため */
.wp-block-search .wp-block-search__label,
.wp-block-search__label {
  display: none !important;
}

/* ラッパー (Gutenbergブロック内) */
.wp-block-search .wp-block-search__inside-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: var(--am-gap-xs) !important;
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
  height: 42px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* HTML5検索フォーム用のlabel調整 */
/* Why: label要素が親のflexコンテナ内で正しく横幅いっぱいに引き伸ばされるようにするため */
.search-form label {
  flex: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* 入力フィールド */
.search-form .search-field,
.widget_search .search-field,
.widget.widget_search .search-field,
.wp-block-search .wp-block-search__input,
.wp-block-search__input {
  flex: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  padding: 0 0.8rem !important;
  border: 1px solid var(--am-border) !important;
  border-radius: 8px !important;
  background: var(--am-bg-alt) !important;
  color: var(--am-text-primary) !important;
  font-size: var(--am-text-sm) !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all var(--am-transition-fast) !important;
  margin: 0 !important;
  display: block !important;
}

.search-form .search-field:focus,
.widget_search .search-field:focus,
.widget.widget_search .search-field:focus,
.wp-block-search .wp-block-search__input:focus,
.wp-block-search__input:focus {
  border-color: var(--am-primary) !important;
  background: var(--am-surface) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--am-primary) 15%, transparent) !important;
}

/* 検索ボタン */
.search-form .search-submit,
.widget_search .search-submit,
.widget.widget_search .search-submit,
.wp-block-search .wp-block-search__button,
.wp-block-search__button {
  height: 42px !important;
  padding: 0 1.2rem !important;
  background: var(--am-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: var(--am-text-sm) !important;
  cursor: pointer;
  box-sizing: border-box !important;
  transition: all var(--am-transition-fast) !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.search-form .search-submit:hover,
.widget_search .search-submit:hover,
.widget.widget_search .search-submit:hover,
.wp-block-search .wp-block-search__button:hover,
.wp-block-search__button:hover {
  background: var(--am-primary-hover) !important;
  transform: translateY(-1px) !important;
}

/* =============================================================================
   レスポンシブデザインの改善 (モバイル対応の強化)
   Why: PC等では最適な2/3カラムを表示しつつ、スマホサイズではサイドバーを綺麗に
   メインコンテンツの下へ落とし、画面幅いっぱいに広がらないよう制御するため。
   ============================================================================= */
@media (max-width: 1024px) {
  .am-single-container,
  .am-container.am-single-container {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--am-gap-xl) !important;
    align-items: center !important;
  }
  
  .am-single-container > main#primary {
    width: 100% !important;
    max-width: 100% !important;
    order: 1 !important; /* メインコンテンツを最上部に */
  }

  .am-single-container > aside.am-sidebar,
  .am-single-container > .am-sidebar-left {
    width: 100% !important;
    max-width: 480px !important; /* モバイル時の最大幅をスマホサイズに制限 */
    margin: 0 auto !important;
    order: 2 !important; /* サイドバーは下に落とす */
  }

  /* ウィジェットの余白をモバイル向けに微調整 */
  .am-widget, .widget {
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* =============================================================================
   アイキャッチ画像位置の変更オプション対応
   Why: ユーザーが設定画面で選んだ「デフォルト」「タイトル下」「抜粋横」「オーバーレイ」の
   各レイアウトを、HTML構造を変更せずにCSSの並び替え・回り込み・絶対配置を用いて実現するため。
   ============================================================================= */

/* --- A. デフォルト (タイトルの上にアイキャッチ) --- */
.am-eyecatch-default .am-single-article {
  display: flex !important;
  flex-direction: column !important;
}
.am-eyecatch-default .am-post-thumbnail {
  order: 1 !important; /* アイキャッチが上 */
}
.am-eyecatch-default .am-entry-header {
  order: 2 !important; /* タイトルが下 */
  margin-top: 1.5rem !important;
}
.am-eyecatch-default .am-entry-content {
  order: 3 !important;
}

/* --- B. タイトル下 (タイトルの下にアイキャッチ - 従来の標準表示) --- */
.am-eyecatch-title-below .am-single-article {
  display: flex !important;
  flex-direction: column !important;
}
.am-eyecatch-title-below .am-entry-header {
  order: 1 !important;
}
.am-eyecatch-title-below .am-post-thumbnail {
  order: 2 !important;
}
.am-eyecatch-title-below .am-entry-content {
  order: 3 !important;
}

/* --- C. 抜粋横 / 本文横 ── */
/* 個別記事 (single.php) : 本文横にアイキャッチを寄せて回り込ませる */
/* Why: 個別記事ページ（single.php）において、PC表示時にアイキャッチが小さくなるのを防ぐため、回り込み（float: left）や幅制限を廃止し、PC表示でもモバイル同様に常に縦積み（画像の下にテキスト）で大きく表示されるように変更しました。 */
.am-eyecatch-excerpt-side .am-single-article {
  display: flex !important;
  flex-direction: column !important;
}
.am-eyecatch-excerpt-side .am-entry-header {
  order: 1 !important;
}
.am-eyecatch-excerpt-side .am-post-thumbnail {
  order: 2 !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  margin-bottom: 2rem !important;
}
.am-eyecatch-excerpt-side .am-entry-content {
  order: 3 !important;
}

/* アーカイブ一覧 (index.php等) : 投稿カードを横並びにする */
/* Why: 抜粋横設定の際、画像サイズが巨大化しないよう、PC表示時は白銀比（954x675）の適切なサイズで中央くり抜き表示するため */
.am-eyecatch-excerpt-side .am-post-grid .am-card-article,
.am-eyecatch-excerpt-side .am-grid-1 .am-card-article {
  padding: 0 !important;
}
.am-eyecatch-excerpt-side .am-post-grid .am-card-link,
.am-eyecatch-excerpt-side .am-grid-1 .am-card-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: var(--am-gap-lg) !important;
  padding: var(--am-gap-lg) !important;
  height: 100% !important;
  width: 100% !important;
}
.am-eyecatch-excerpt-side .am-post-grid .am-card-thumbnail,
.am-eyecatch-excerpt-side .am-grid-1 .am-card-thumbnail {
  width: 170px !important;
  aspect-ratio: 954 / 675 !important;
  height: auto !important;
  flex-shrink: 0 !important;
  border-radius: var(--am-radius-sm) !important;
  overflow: hidden !important;
  position: relative !important;
  padding-top: 0 !important; /* 標準の padding-top: 60% をリセット */
  margin: 0 !important;
}
.am-eyecatch-excerpt-side .am-post-grid .am-card-thumbnail img,
.am-eyecatch-excerpt-side .am-grid-1 .am-card-thumbnail img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important; /* 中央でくり抜く */
}
.am-eyecatch-excerpt-side .am-post-grid .am-card-content,
.am-eyecatch-excerpt-side .am-grid-1 .am-card-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
}
@media (max-width: 768px) {
  .am-eyecatch-excerpt-side .am-post-grid .am-card-link,
  .am-eyecatch-excerpt-side .am-grid-1 .am-card-link {
    flex-direction: row !important; /* スマホでも横並びを完全に維持 */
    align-items: center !important;
    gap: var(--am-gap-md) !important; /* 余白を詰める */
    padding: var(--am-gap-md) !important; /* 余白を詰める */
  }
  .am-eyecatch-excerpt-side .am-post-grid .am-card-thumbnail,
  .am-eyecatch-excerpt-side .am-grid-1 .am-card-thumbnail {
    width: 110px !important; /* スマホ用に横幅を縮小 */
    aspect-ratio: 954 / 675 !important; /* 白銀比を維持 */
    height: auto !important;
  }
  .am-eyecatch-excerpt-side .am-post-grid .am-card-title,
  .am-eyecatch-excerpt-side .am-grid-1 .am-card-title {
    font-size: 0.95rem !important; /* フォントサイズを小さく */
    margin-bottom: var(--am-gap-xs) !important;
    line-height: 1.3 !important;
  }
  .am-eyecatch-excerpt-side .am-post-grid .am-card-excerpt,
  .am-eyecatch-excerpt-side .am-grid-1 .am-card-excerpt {
    font-size: 0.75rem !important; /* 抜粋文字サイズを小さく */
    line-height: 1.4 !important;
    margin-bottom: var(--am-gap-xs) !important;
  }
  .am-eyecatch-excerpt-side .am-post-grid .am-card-footer,
  .am-eyecatch-excerpt-side .am-grid-1 .am-card-footer {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    font-size: 0.7rem !important;
  }
}

/* --- D. アイキャッチにタイトルをオーバーレイ ── */
/* 個別記事 (single.php) : タイトルと画像をCSS Gridで同一エリアに配置して重ね合わせる */
/* Why: スキンのpadding値に影響されず、常にアイキャッチ画像とヘッダータイトルを同サイズ・同位置に綺麗に重ね合わせるため */
.am-eyecatch-overlay .am-single-article {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 100% !important;
}
.am-eyecatch-overlay .am-entry-header,
.am-eyecatch-overlay .am-post-thumbnail {
  grid-area: 1 / 1 / 2 / 2 !important;
}

.am-eyecatch-overlay .am-entry-header {
  position: relative !important;
  z-index: 2 !important;
  aspect-ratio: 1200 / 675 !important; /* 固定高さを廃止し比率固定 */
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 2rem !important;
  margin-top: 0 !important;
  margin-bottom: 2.5rem !important;
  background: transparent !important;
  border-radius: var(--am-radius-md) !important;
  overflow: hidden !important;
}
/* 暗い半透明マスクを追加 */
.am-eyecatch-overlay .am-entry-header::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.45) !important;
  z-index: 1 !important;
  border-radius: var(--am-radius-md) !important;
}
/* ヘッダー内の要素がオーバーレイより手前に表示されるように制御 */
.am-eyecatch-overlay .am-entry-header > * {
  position: relative !important;
  z-index: 2 !important;
}
.am-eyecatch-overlay .am-entry-title {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  text-align: center;
  font-size: 2rem !important;
}
@media (max-width: 768px) {
  .am-eyecatch-overlay .am-entry-title {
    font-size: 1.25rem !important;
  }
  .am-eyecatch-overlay .am-entry-header {
    padding: 1rem !important; /* スマホではパディングを詰める */
  }
}
.am-eyecatch-overlay .am-entry-meta,
.am-eyecatch-overlay .am-entry-meta .am-date,
.am-eyecatch-overlay .am-cat-badge a {
  color: rgba(255, 255, 255, 0.9) !important;
}
.am-eyecatch-overlay .am-cat-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* アイキャッチ画像のスタイル調整 */
.am-eyecatch-overlay .am-post-thumbnail {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  aspect-ratio: 1200 / 675 !important; /* 固定高さを廃止し比率固定 */
  height: auto !important;
  margin: 0 !important;
  margin-bottom: 2.5rem !important;
  border-radius: var(--am-radius-md) !important;
  overflow: hidden !important;
  box-shadow: none !important;
}
.am-eyecatch-overlay .am-post-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* アーカイブ一覧 (index.php等) : 投稿カード全体を背景画像とグラデーションマスクで覆いタイトルを重ねる */
/* Why: カード表示時でもタイトルと抜粋がアイキャッチの上に美しくオーバーレイされるLinear風のデザインにするため */
.am-eyecatch-overlay .am-post-grid .am-card-article,
.am-eyecatch-overlay .am-grid-1 .am-card-article {
  position: relative !important;
  overflow: hidden !important;
  aspect-ratio: 1200 / 675 !important; /* 固定高さを廃止し比率固定 */
  height: auto !important;
  padding: 0 !important;
}
/* カード全体のリンクを全面に広げる */
.am-eyecatch-overlay .am-post-grid .am-card-link,
.am-eyecatch-overlay .am-grid-1 .am-card-link {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
/* アイキャッチ画像を最背面に絶対配置 */
.am-eyecatch-overlay .am-post-grid .am-card-thumbnail,
.am-eyecatch-overlay .am-grid-1 .am-card-thumbnail {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding-top: 0 !important; /* padding-top: 60% をリセット */
  margin: 0 !important;
  z-index: 1 !important;
}
.am-eyecatch-overlay .am-post-grid .am-card-thumbnail img,
.am-eyecatch-overlay .am-grid-1 .am-card-thumbnail img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
/* 暗い半透明マスク（グラデーション）を画像の上に重ねる */
.am-eyecatch-overlay .am-post-grid .am-card-link::before,
.am-eyecatch-overlay .am-grid-1 .am-card-link::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%) !important;
  z-index: 2 !important;
}
/* コンテンツを最前面に配置し、下寄せにする */
.am-eyecatch-overlay .am-post-grid .am-card-content,
.am-eyecatch-overlay .am-grid-1 .am-card-content {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 3 !important;
  padding: var(--am-gap-lg) !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}
/* テキストカラーを白系に統一 */
.am-eyecatch-overlay .am-post-grid .am-card-content *,
.am-eyecatch-overlay .am-grid-1 .am-card-content * {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}
.am-eyecatch-overlay .am-post-grid .am-card-title,
.am-eyecatch-overlay .am-grid-1 .am-card-title {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  margin-bottom: 0.5rem !important;
}
.am-eyecatch-overlay .am-post-grid .am-card-excerpt,
.am-eyecatch-overlay .am-grid-1 .am-card-excerpt {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.875rem !important;
  margin-bottom: 0.5rem !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.am-eyecatch-overlay .am-post-grid .am-card-footer,
.am-eyecatch-overlay .am-grid-1 .am-card-footer {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
@media (max-width: 768px) {
  /* スマホでのオーバーレイカード内の余白をさらにタイトに調整 */
  .am-eyecatch-overlay .am-post-grid .am-card-content,
  .am-eyecatch-overlay .am-grid-1 .am-card-content {
    padding: var(--am-gap-md) !important;
  }
  .am-eyecatch-overlay .am-post-grid .am-card-title,
  .am-eyecatch-overlay .am-grid-1 .am-card-title {
    font-size: 1rem !important;
    margin-bottom: 0.25rem !important;
  }
}

/* =============================================================================
   ヘッダー画像、画像下ナビ、およびモバイルインラインメニューの拡張スタイル
   Why: アスペクト比2:1で画面幅いっぱいのヘッダー画像と、その下部に配置可能なPCメニュー、
        さらにモバイルでの横スクロール可能なインラインメニューを実現するため。
   ============================================================================= */

/* 1. ヘッダー画像 */
.am-header-image-container {
    width: 100%;
    overflow: hidden;
    display: block;
    line-height: 0;
}
.am-header-image {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}

/* 2. 画像の下に配置されるPCナビゲーションバー */
.am-nav-container-pc-below {
    background: var(--am-surface);
    border-bottom: 1px solid var(--am-border);
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.am-nav-pc-below {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0.8rem 0;
    gap: var(--am-gap-xl, 1.5rem);
}
.am-nav-pc-below li {
    display: inline-block;
}
.am-nav-pc-below li a {
    color: var(--am-text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.am-nav-pc-below li a:hover {
    color: var(--am-primary);
}
@media (max-width: 768px) {
    .am-nav-container-pc-below {
        display: none;
    }
}

/* 3. モバイルインライン横スクロールメニュー */
.am-nav-container-mobile-inline {
    width: 100%;
    background: var(--am-surface);
    border-bottom: 1px solid var(--am-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    display: none;
}
@media (max-width: 768px) {
    .am-nav-container-mobile-inline {
        display: block;
    }
}
.am-mobile-inline-inner {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 0.6rem var(--am-gap-md, 1rem);
    scrollbar-width: none;
}
.am-mobile-inline-inner::-webkit-scrollbar {
    display: none;
}
.am-nav-mobile-inline {
    display: inline-flex;
    gap: var(--am-gap-md, 1rem);
    list-style: none;
    margin: 0;
    padding: 0;
}
.am-nav-mobile-inline li {
    display: inline-block;
}
.am-nav-mobile-inline li a {
    display: block;
    color: var(--am-text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: var(--am-bg-alt, #f1f5f9);
    transition: all 0.2s ease;
}
.am-nav-mobile-inline li a:hover {
    background: var(--am-primary);
    color: #fff;
}

/* モバイルインラインメニューのデザインオプション対応 */
.am-md-dark .am-nav-container-mobile-inline {
    background: var(--am-text-primary) !important;
}
.am-md-dark .am-nav-mobile-inline li a {
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}
.am-md-dark .am-nav-mobile-inline li a:hover {
    color: #fff !important;
    background: var(--am-primary) !important;
}

.am-md-accent .am-nav-container-mobile-inline {
    background: var(--am-primary) !important;
}
.am-md-accent .am-nav-mobile-inline li a {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}
.am-md-accent .am-nav-mobile-inline li a:hover {
    color: #fff !important;
    background: var(--am-accent) !important;
}

.am-md-glass .am-nav-container-mobile-inline {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


