@charset "UTF-8";

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

/************************************
** Geometric 3D Design System v3.0
** 幾何学アニメーション＋3Dデザイン
************************************/

/* =====================================
   CSS Custom Properties
===================================== */
:root {
  /* メインカラーパレット - ビビッド */
  --color-pink: #ff4081;
  --color-coral: #ff6b6b;
  --color-yellow: #ffc107;
  --color-orange: #ff9800;
  --color-cyan: #00bcd4;
  --color-teal: #009688;
  --color-blue: #2196f3;
  --color-indigo: #3f51b5;
  --color-purple: #9c27b0;
  --color-green: #4caf50;
  
  /* プライマリグラデーション */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-ocean: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  
  /* ベースカラー */
  --bg-main: #ffffff;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #1a1a2e;
  
  /* テキスト */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  /* ボーダー */
  --border-light: rgba(0, 0, 0, 0.08);
  --border-color: rgba(0, 0, 0, 0.1);
  
  /* シャドウ */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --shadow-color: 0 10px 40px rgba(102, 126, 234, 0.3);
  
  /* 角丸 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* トランジション */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.4s var(--ease-out);
  --transition-slow: 0.6s var(--ease-out);
  
  /* フォント */
  --font-main: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* スペース */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

/* =====================================
   Base Styles
===================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background: transparent;
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* =====================================
   幾何学背景アニメーション
===================================== */
.geometric-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9ff 0%, #fff5f8 50%, #f0f8ff 100%);
}

/* 幾何学シェイプ */
.geo-shape {
  position: absolute;
  opacity: 0.7;
}

.geo-shape-1 {
  top: -5%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: var(--color-pink);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: float-rotate 20s ease-in-out infinite;
}

.geo-shape-2 {
  top: 10%;
  right: -3%;
  width: 250px;
  height: 250px;
  background: var(--color-cyan);
  clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
  animation: float-rotate 25s ease-in-out infinite reverse;
}

.geo-shape-3 {
  bottom: 20%;
  left: 5%;
  width: 200px;
  height: 200px;
  background: var(--color-yellow);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  animation: float-rotate 18s ease-in-out infinite;
}

.geo-shape-4 {
  bottom: -5%;
  right: 10%;
  width: 280px;
  height: 280px;
  background: var(--color-green);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  animation: float-rotate 22s ease-in-out infinite reverse;
}

.geo-shape-5 {
  top: 40%;
  left: 50%;
  width: 150px;
  height: 150px;
  background: var(--color-orange);
  border-radius: 50%;
  animation: pulse-float 15s ease-in-out infinite;
}

/* 動く線 */
.animated-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  height: 2px;
  animation: line-move 8s linear infinite;
}

.line-1 {
  top: 20%;
  width: 200px;
  animation-delay: 0s;
}

.line-2 {
  top: 40%;
  width: 150px;
  animation-delay: 2s;
}

.line-3 {
  top: 60%;
  width: 180px;
  animation-delay: 4s;
}

.line-4 {
  top: 80%;
  width: 220px;
  animation-delay: 6s;
}

/* 縦線 */
.line-v {
  width: 2px;
  height: 150px;
  background: linear-gradient(180deg, transparent, var(--color-pink), transparent);
  animation: line-move-v 10s linear infinite;
}

.line-v-1 {
  left: 15%;
  animation-delay: 1s;
}

.line-v-2 {
  left: 85%;
  animation-delay: 3s;
}

/* ドットパターン */
.dot-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* =====================================
   アニメーション定義
===================================== */
@keyframes float-rotate {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(20px) rotate(-5deg);
  }
}

@keyframes pulse-float {
  0%, 100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -30px) scale(1.1);
    opacity: 0.8;
  }
}

@keyframes line-move {
  0% {
    left: -200px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes line-move-v {
  0% {
    top: -150px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes bounce-x {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); }
  50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.6); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =====================================
   Typography
===================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.entry-title,
.article-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  margin: var(--space-12) 0 var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--gradient-primary);
  color: var(--text-white) !important;
  -webkit-text-fill-color: white;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-color);
}

h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s infinite;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin: var(--space-10) 0 var(--space-4);
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  border-left: 4px solid var(--color-pink);
  background: linear-gradient(90deg, rgba(255, 64, 129, 0.1), transparent);
}

h4 {
  font-size: 1.1rem;
  margin: var(--space-8) 0 var(--space-3);
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--color-indigo);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-pink);
}

/* =====================================
   Header
===================================== */
.header,
#header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-normal);
}

.header.header-scrolled {
  box-shadow: var(--shadow-lg);
}

.header-in,
#header-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
}

.site-name-text,
.logo-text {
  font-weight: 900 !important;
  font-size: 1.8rem !important;
  color: #333 !important;
  -webkit-text-fill-color: #333 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  /* 多重シャドウによる3D押し出し効果 */
  text-shadow: 
    0 1px 0 #ccc,
    0 2px 0 #c9c9c9,
    0 3px 0 #bbb,
    0 4px 0 #b9b9b9,
    0 5px 0 #aaa,
    0 6px 1px rgba(0,0,0,.1),
    0 0 5px rgba(0,0,0,.1),
    0 1px 3px rgba(0,0,0,.3),
    0 3px 5px rgba(0,0,0,.2),
    0 5px 10px rgba(0,0,0,.25),
    0 10px 10px rgba(0,0,0,.2),
    0 20px 20px rgba(0,0,0,.15);
  transition: transform 0.3s var(--ease-out);
  display: inline-block;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

/* ネオンシマー効果（周期的に光が走る） */
.site-name-text::after,
.logo-text::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: logo-shimmer 6s infinite;
  pointer-events: none;
}

@keyframes logo-shimmer {
  0% { left: -100%; }
  20% { left: 150%; }
  100% { left: 150%; }
}

.site-name-text:hover,
.logo-text:hover {
  /* ホバー時にわずかに浮き上がる */
  transform: translateY(-5px) rotateX(10deg);
}

/* 3Dロゴへのネオンシマー効果（周期的に光が走る） */
.site-name-text,
.logo-text {
  position: relative;
  overflow: hidden;
}

.site-name-text::after,
.logo-text::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: logo-shimmer 6s infinite;
  pointer-events: none;
}

@keyframes logo-shimmer {
  0% { left: -100%; }
  20% { left: 150%; }
  100% { left: 150%; }
}

/* ナビゲーション */
.navi-in > ul {
  display: flex;
  gap: var(--space-1);
}

.navi-in > ul > li > a {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.navi-in > ul > li > a:hover {
  color: var(--text-white);
  background: var(--gradient-primary);
}

/* =====================================
   Main Layout
===================================== */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  position: relative;
  z-index: 10;
}

/* =====================================
   垂直同期と位置合わせの最終リセット（垂直完全同期版）
===================================== */

/* コンテナ全体のパディングを極限まで調整 */
body.home .wrap,
body.front-page .wrap,
body.blog .wrap,
body.archive .wrap,
body.single .wrap,
body.page .wrap,
body.category .wrap,
body.tag .wrap,
body.search .wrap {
  padding-top: 0.2rem !important; /* 全体の上端を少し引き上げる */
}

/* ヘッダーとパンくずの死にスペースを完全排除 */
#header,
.header,
.header-in,
#header-in {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* パンくずリストを全ページで非表示（隙間の原因を排除） */
.breadcrumb {
  display: none !important;
}

@media screen and (min-width: 1024px) {
  /* メインとサイドバーの上端を物理的に強制整列 */
  .content-in {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 32px;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Cocoon標準のコンテナ余白を完全無効化 */
  #main,
  #sidebar,
  .main,
  .sidebar,
  #content,
  .content,
  #main-inner,
  #sidebar-inner {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
  }

  /* 記事カードの最初の要素の上端余白をゼロに */
  #main > .entry-card-wrap:first-child,
  #main > .article:first-child,
  .entry-card-wrap:first-child,
  .list:first-child,
  #main > article:first-child,
  #main > div:first-child,
  .article {
    margin-top: 0 !important;
  }

  /* ★サイドバーの最初のウィジェット位置を極限まで引き上げる */
  #sidebar .widget:first-child,
  .sidebar .widget:first-child {
    margin-top: 0 !important;
    position: relative;
    /* 3D効果による浮き沈み分を補正するため、わずかに上に寄せる */
    top: -2px;
    /* 最初のウィジェットだけ影の広がりを抑え、ラインを揃える */
    box-shadow: 
      0 4px 15px rgba(0, 0, 0, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.5) !important;
  }

  /* 最初のウィジェット内のフォームの余白を強制解除 */
  #sidebar .widget:first-child .search-form,
  #sidebar .widget:first-child > form,
  #sidebar .widget:first-child > div,
  #sidebar .widget:first-child > ul,
  #sidebar .widget:first-child .widget_search,
  #sidebar .widget:first-child .search-box,
  .sidebar .widget:first-child .search-form,
  .sidebar .widget:first-child > form,
  .sidebar .widget:first-child > div {
    padding-top: var(--space-2) !important; /* 0だと窮屈なため極小値に設定 */
    margin-top: 0 !important;
  }

  /* 各種bodyクラスに対応した幅の固定 */
  body.home #main,
  body.front-page #main,
  body.blog #main,
  body.archive #main,
  body.single #main,
  body.page #main,
  body.category #main,
  body.tag #main,
  body.search #main {
    flex: 1 !important;
    max-width: calc(100% - 332px) !important;
  }

  #sidebar {
    width: 300px !important;
    flex: 0 0 300px !important;
    min-width: 300px !important;
  }
}

/* 個別記事（.article）内の余白削減（白い空白対策） */
.article {
  margin-top: 0 !important;
}

/* インデックスリスト・カードリストの上部余白も削除 */
body.home .list,
body.home .index-tab-body,
body.home #list,
body.front-page .list,
body.front-page .index-tab-body,
body.front-page #list,
body.blog .list,
body.blog .index-tab-body,
body.blog #list {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Cocoonのタブ切り替えボタンの上余白も調整 */
body.home .index-tab-buttons,
body.front-page .index-tab-buttons,
body.blog .index-tab-buttons {
  margin-top: 0 !important;
  margin-bottom: var(--space-4) !important;
}

/* モバイル表示での調整 */
@media screen and (max-width: 834px) {
  body.home .wrap,
  body.front-page .wrap,
  body.blog .wrap {
    padding-top: var(--space-3) !important;
  }
  
  body.single .wrap,
  body.page .wrap,
  body.archive .wrap,
  body.category .wrap {
    padding-top: var(--space-4) !important;
  }
}

#main {
  background: transparent;
}

.content-in {
  display: flex;
  gap: var(--space-10);
}

#content {
  flex: 1;
  min-width: 0;
}

/* コンテンツエリア全体の背景 */
#content-in,
.content-in,
#main,
.main,
.content {
  position: relative;
  z-index: 10;
}

/* =====================================
   Entry Cards - カラフル3Dカード
===================================== */
.entry-card-wrap {
  perspective: 1500px;
  margin-bottom: var(--space-8);
  position: relative;
  z-index: 10;
}

.entry-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transform-style: preserve-3d;
  transition: var(--transition-normal);
  border: none;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

/* カラフルなトップボーダー */
.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-warm);
  z-index: 2;
}

/* ホバー時のグロー */
.entry-card::after {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--gradient-primary);
  border-radius: calc(var(--radius-lg) + 3px);
  opacity: 0;
  z-index: -1;
  transition: var(--transition-normal);
  filter: blur(10px);
}

.entry-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.entry-card:hover::after {
  opacity: 0.5;
}

/* サムネイル - 3Dパララックス対応 */
.entry-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  will-change: transform;
}

.entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

/* JSで制御するため、CSSでのホバー変形は最小限に */
.entry-card:hover .entry-card-thumb img {
  /* JSパララックス効果が適用されない場合のフォールバック */
}

/* カードコンテンツ */
.entry-card-content {
  padding: var(--space-6);
}

.entry-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: var(--space-2);
  transition: var(--transition-fast);
}

.entry-card:hover .entry-card-title {
  color: var(--color-indigo);
}

.entry-card-snippet {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* カテゴリラベル - カラフル */
.cat-label {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--gradient-sunset);
  color: var(--text-white);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(250, 112, 154, 0.4);
  z-index: 3;
}

/* =====================================
   Single Article
===================================== */
.article {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: visible;
  position: relative;
  z-index: 20;
  box-shadow: var(--shadow-lg);
}

/* 記事内のすべての要素に背景を確保 */
.article-header,
.article-body,
.article-footer,
.entry-content,
.entry-title,
.post-meta,
.post-date,
.author-info {
  position: relative;
  z-index: 21;
}

/* レインボートップバー */
.article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, 
    var(--color-pink), 
    var(--color-orange), 
    var(--color-yellow), 
    var(--color-green), 
    var(--color-cyan), 
    var(--color-indigo)
  );
  background-size: 200% 100%;
  animation: gradient-move 5s linear infinite;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

@keyframes gradient-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.article-header {
  padding-top: 1rem !important; /* タイトルを少し下げてバランスを取る */
  padding-bottom: var(--space-4) !important;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
  text-align: center;
}

.article-header::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: var(--gradient-warm);
  border-radius: var(--radius-full);
  margin: var(--space-4) auto 0 !important; /* 下線の隙間も調整 */
}

.entry-content {
  padding: var(--space-8);
  font-size: 1.05rem;
}

/* アイキャッチ - 3Dフロート装飾 */
.eye-catch {
  margin: 0 var(--space-8) var(--space-8);
  border-radius: var(--radius-lg);
  overflow: visible !important;
  box-shadow: var(--shadow-lg);
  position: relative;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* アイキャッチの背景グロー効果 */
.eye-catch::before {
  content: '';
  position: absolute;
  inset: -15px;
  background: var(--gradient-primary);
  filter: blur(30px);
  opacity: 0.15;
  z-index: -1;
  border-radius: var(--radius-lg);
  transition: opacity 0.3s ease;
}

.eye-catch:hover::before {
  opacity: 0.25;
}

.eye-catch img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
}

/* =====================================
   Sidebar - グラスモーフィズム＆幾何学デザイン（3D強化版）
===================================== */
#sidebar {
  width: 340px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.sidebar {
  position: sticky;
  top: 100px;
  z-index: 10;
  perspective: 1000px;
}

/* ウィジェット - 3D浮遊グラスモーフィズム */
.widget {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  overflow: visible;
  margin-bottom: var(--space-6);
  /* ニューモーフィズム風の3D影 */
  box-shadow: 
    20px 20px 60px rgba(0, 0, 0, 0.05),
    -20px -20px 60px rgba(255, 255, 255, 0.8),
    0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  position: relative;
  z-index: 10;
  will-change: transform;
  padding: 0 !important;
  transform: translateZ(0);
}

/* ウィジェットごとにz-indexとホバー時の浮き上がりを変える */
.widget:nth-child(1) { z-index: 14; }
.widget:nth-child(2) { z-index: 13; }
.widget:nth-child(3) { z-index: 12; }
.widget:nth-child(4) { z-index: 11; }
.widget:nth-child(n+5) { z-index: 10; }

.widget:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg) scale(1.02);
  box-shadow: 
    var(--shadow-xl),
    0 0 40px rgba(102, 126, 234, 0.2),
    0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ウィジェット内の各コンテンツエリアに一括で適切な余白を適用 */
.widget > ul,
.widget > div,
.widget > form,
.widget > p,
.widget_search,
.widget_text,
.widget_recent_entries,
.widget_categories,
.widget_archive,
.widget_nav_menu,
.widget_meta,
.widget_pages,
.tagcloud,
.textwidget {
  padding: var(--space-5) var(--space-6) !important;
}

/* ★最初のウィジェットの上部パディングのみゼロにして記事カードと上端を揃える */
#sidebar .widget:first-child > ul,
#sidebar .widget:first-child > div,
#sidebar .widget:first-child > form,
#sidebar .widget:first-child .widget_search,
#sidebar .widget:first-child .search-form,
.sidebar .widget:first-child > ul,
.sidebar .widget:first-child > div,
.sidebar .widget:first-child > form,
.sidebar .widget:first-child .search-form {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ウィジェットタイトル - カラフル背景 */
.widget:nth-child(1) .widget-title { background: var(--gradient-warm); }
.widget:nth-child(2) .widget-title { background: var(--gradient-cool); }
.widget:nth-child(3) .widget-title { background: var(--gradient-primary); }
.widget:nth-child(4) .widget-title { background: var(--gradient-sunset); }
.widget:nth-child(n+5) .widget-title { background: var(--gradient-ocean); color: var(--text-primary); }

/* ウィジェットタイトル - 幾何学アイコン付き */
.widget-title {
  color: var(--text-white);
  padding: var(--space-4) var(--space-5);
  padding-left: 3.5rem !important;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  overflow: visible !important;
}

/* 幾何学アイコン（三角形）- 浮遊アニメーション */
.widget-title::before {
  content: '';
  position: absolute;
  left: 1.2rem;
  top: 50%;
  width: 18px;
  height: 18px;
  background: var(--color-yellow);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transform: translateY(-50%) rotate(0deg);
  animation: geoIconFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  z-index: 2;
}

/* ウィジェットごとにアイコンの形状・色を変える */
.widget:nth-child(2) .widget-title::before {
  background: var(--color-cyan);
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  animation-delay: -1s;
}

.widget:nth-child(3) .widget-title::before {
  background: var(--color-pink);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  animation-delay: -2s;
}

.widget:nth-child(4) .widget-title::before {
  background: var(--color-green);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation-delay: -3s;
}

.widget:nth-child(n+5) .widget-title::before {
  background: var(--color-orange);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation-delay: -0.5s;
}

/* ネオン・ライン・アクセント（見出し下の光るライン） */
.widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255,255,255,0.8) 50%, 
    transparent 100%
  );
  animation: neonLineMove 3s linear infinite;
}

@keyframes neonLineMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 幾何学アイコンの浮遊アニメーション */
@keyframes geoIconFloat {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-65%) rotate(180deg) scale(1.1);
  }
}

/* リスト要素 */
.widget ul {
  list-style: none;
  padding: var(--space-5) var(--space-6) !important;
  margin: 0;
}

.widget li {
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--border-light);
}

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

/* リストリンク - 幾何学マーカー付き */
.widget li a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  text-decoration: none;
}

.widget li a::before {
  content: '▲';
  font-size: 0.55rem;
  color: var(--color-pink);
  transition: transform 0.3s var(--ease-bounce), color 0.3s ease;
  display: inline-block;
}

.widget li a:hover {
  color: var(--color-indigo);
  transform: translateX(6px);
}

.widget li a:hover::before {
  transform: rotate(180deg) scale(1.4);
  color: var(--color-cyan);
}

/* =====================================
   CTA Buttons - ネオン3Dボタン + 磁力効果対応
===================================== */
.myppc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-10);
  border-radius: var(--radius-lg);
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.02em;
  will-change: transform;
}

/* 光沢オーバーレイ */
.myppc-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
  pointer-events: none;
}

/* シャインエフェクト → ネオンシマーにアップグレード */
.myppc-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(255,255,255,0.1) 25%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0.1) 75%,
    transparent 100%
  );
  animation: neonShimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes neonShimmer {
  0% { left: -100%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.myppc-btn:hover::after {
  animation: neonShimmerFast 0.6s ease-out forwards;
}

@keyframes neonShimmerFast {
  0% { left: -100%; }
  100% { left: 100%; }
}

.myppc-btn:hover {
  transform: translateY(-6px) scale(1.03);
}

.myppc-btn:active {
  transform: translateY(-2px) scale(0.98);
}

/* ボタンカラー */
.myppc-btn-pink {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: var(--text-white) !important;
  box-shadow: 
    0 6px 0 #c0392b,
    0 10px 30px rgba(238, 90, 36, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-pink:hover {
  box-shadow: 
    0 8px 0 #c0392b,
    0 20px 50px rgba(238, 90, 36, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-white) !important;
  box-shadow: 
    0 6px 0 #4c51bf,
    0 10px 30px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-blue:hover {
  box-shadow: 
    0 8px 0 #4c51bf,
    0 20px 50px rgba(102, 126, 234, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-green {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: var(--text-white) !important;
  box-shadow: 
    0 6px 0 #0d7d74,
    0 10px 30px rgba(56, 239, 125, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-green:hover {
  box-shadow: 
    0 8px 0 #0d7d74,
    0 20px 50px rgba(56, 239, 125, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-orange {
  background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
  color: var(--text-white) !important;
  box-shadow: 
    0 6px 0 #d68910,
    0 10px 30px rgba(242, 153, 74, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-orange:hover {
  box-shadow: 
    0 8px 0 #d68910,
    0 20px 50px rgba(242, 153, 74, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-purple {
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  color: var(--text-white) !important;
  box-shadow: 
    0 6px 0 #7c3aed,
    0 10px 30px rgba(168, 85, 247, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.myppc-btn-purple:hover {
  box-shadow: 
    0 8px 0 #7c3aed,
    0 20px 50px rgba(168, 85, 247, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

/* アイコン付きボタン */
.myppc-btn-icon {
  gap: var(--space-4);
}

.myppc-btn-icon span:first-child {
  font-size: 1.3em;
  animation: bounce-x 1s infinite;
}

/* リンクスタイル除去 */
a:has(> .myppc-btn),
a .myppc-btn,
a:has(.myppc-btn) {
  text-decoration: none !important;
  border: none !important;
}

/* =====================================
   Pagination
===================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-12) 0;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 var(--space-4);
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition-fast);
}

.page-numbers:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--text-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-color);
}

.page-numbers.current {
  background: var(--gradient-warm);
  border-color: transparent;
  color: var(--text-white);
  box-shadow: 0 4px 20px rgba(240, 147, 251, 0.4);
}

/* =====================================
   Footer
===================================== */
.footer,
#footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: var(--space-16) 0 var(--space-8);
  position: relative;
  overflow: hidden;
  margin-top: var(--space-16);
}

/* レインボートップライン */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--color-pink), 
    var(--color-orange), 
    var(--color-yellow), 
    var(--color-green), 
    var(--color-cyan)
  );
  background-size: 200% 100%;
  animation: gradient-move 4s linear infinite;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--color-pink);
}

.copyright {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* =====================================
   Scroll to Top
===================================== */
.go-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 56px;
  height: 56px;
  background: var(--gradient-warm);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 1.25rem;
  box-shadow: 0 4px 20px rgba(240, 147, 251, 0.4);
  transition: var(--transition-normal);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  cursor: pointer;
  text-decoration: none;
}

.go-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.go-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 30px rgba(240, 147, 251, 0.5);
  color: var(--text-white);
}

/* =====================================
   Breadcrumb
===================================== */
.breadcrumb {
  padding: var(--space-4) 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--color-pink);
}

/* =====================================
   SNS Share - 磁力効果対応
===================================== */
.sns-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  padding: var(--space-8) 0;
}

.sns-share-buttons a,
.sns-follow-buttons a,
.share-button,
.follow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  color: var(--text-white) !important;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
  will-change: transform;
  position: relative;
}

.sns-share-buttons a:hover,
.sns-follow-buttons a:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* SNSフォローボタン */
.sns-follow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  padding: var(--space-4) 0;
}

/* =====================================
   Table of Contents
===================================== */
.toc {
  background: linear-gradient(145deg, rgba(102, 126, 234, 0.05), rgba(240, 147, 251, 0.05));
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 3px solid var(--color-pink);
  display: inline-block;
}

.toc-content ul {
  list-style: none;
  padding-left: var(--space-4);
}

.toc-content li {
  padding: var(--space-2) 0;
}

.toc-content a {
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.toc-content a:hover {
  color: var(--color-indigo);
  padding-left: var(--space-2);
}

/* =====================================
   Blockquote
===================================== */
blockquote {
  background: linear-gradient(145deg, rgba(255, 64, 129, 0.08), rgba(255, 152, 0, 0.05));
  border-left: 4px solid var(--color-pink);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-6) var(--space-8);
  margin: var(--space-8) 0;
  font-style: italic;
  color: var(--text-secondary);
  position: relative;
}

blockquote::before {
  content: '"';
  position: absolute;
  top: -15px;
  left: var(--space-4);
  font-size: 4rem;
  color: var(--color-pink);
  opacity: 0.3;
  font-family: Georgia, serif;
}

/* =====================================
   Code
===================================== */
pre {
  background: #1e1e2e;
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  margin: var(--space-8) 0;
  box-shadow: var(--shadow-lg);
}

code {
  font-family: 'Fira Code', 'Source Code Pro', monospace;
  font-size: 0.9em;
}

:not(pre) > code {
  background: rgba(255, 64, 129, 0.1);
  color: var(--color-pink);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* =====================================
   Images
===================================== */
.entry-content img,
.article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.entry-content img:hover,
.article img:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.01);
}

/* =====================================
   Forms
===================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: var(--space-4);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-pink);
  box-shadow: 0 0 0 4px rgba(255, 64, 129, 0.2);
}

button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  background: var(--gradient-warm);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

button:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

/* =====================================
   Mobile Menu - グラスモーフィズム
===================================== */
@media screen and (max-width: 834px) {
  .mobile-menu-buttons {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 24px 24px 0 0 !important;
    padding: var(--space-2) var(--space-4);
    padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom)) !important;
    z-index: 1000;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05) !important;
  }
  
  .mobile-menu-buttons .menu-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    color: var(--text-secondary);
    font-size: 0.7rem;
    transition: transform 0.2s var(--ease-out);
    text-decoration: none;
    position: relative;
  }
  
  .mobile-menu-buttons .menu-button:hover,
  .mobile-menu-buttons .menu-button.active {
    color: var(--color-pink);
  }
  
  /* アクティブなボタンの強調演出 */
  .mobile-menu-buttons .menu-button:active {
    transform: scale(0.9);
  }
  
  .mobile-menu-buttons .menu-button i,
  .mobile-menu-buttons .menu-button .fa,
  .mobile-menu-buttons .menu-button [class^="fa-"] {
    font-size: 1.4rem !important;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* =====================================
   Responsive
===================================== */
@media screen and (max-width: 1023px) {
  .content-in {
    flex-direction: column;
  }
  
  #sidebar {
    width: 100%;
    margin-top: var(--space-10);
  }
  
  .sidebar {
    position: static;
  }
  
  /* 幾何学シェイプを縮小 */
  .geo-shape-1,
  .geo-shape-2,
  .geo-shape-3,
  .geo-shape-4 {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

@media screen and (max-width: 834px) {
  body {
    padding-bottom: 80px;
  }
  
  .header-in,
  #header-in {
    padding: var(--space-2) var(--space-4);
  }
  
  .wrap {
    padding: var(--space-6) var(--space-4);
  }
  
  .entry-card {
    border-radius: var(--radius-md);
  }
  
  .entry-card:hover {
    transform: translateY(-6px);
  }
  
  .article {
    border-radius: var(--radius-lg);
  }
  
  .article-header {
    padding: var(--space-8) var(--space-4) var(--space-6);
  }
  
  .entry-content {
    padding: var(--space-4);
  }
  
  .eye-catch {
    margin: 0 var(--space-4) var(--space-6);
  }
  
  h2 {
    font-size: 1.15rem;
    padding: var(--space-3) var(--space-4);
  }
  
  .myppc-btn {
    padding: var(--space-4) var(--space-6);
    font-size: 1rem;
  }
  
  .go-to-top {
    bottom: 100px;
    right: var(--space-4);
    width: 48px;
    height: 48px;
  }
  
  /* 幾何学シェイプをさらに縮小 */
  .geo-shape {
    opacity: 0.3;
    transform: scale(0.5);
  }
}

@media screen and (max-width: 480px) {
  .entry-card-content {
    padding: var(--space-4);
  }
  
  .entry-card-title {
    font-size: 1rem;
  }
  
  .myppc-btn {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    font-size: 0.95rem;
  }
  
  /* モバイルでは幾何学非表示 */
  .geometric-bg,
  .animated-lines {
    display: none;
  }
}

/* =====================================
   Utility Classes
===================================== */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-element.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

.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;
}

/* =====================================
   Print
===================================== */
@media print {
  .geometric-bg,
  .animated-lines,
  .dot-pattern,
  .header,
  #header,
  .footer,
  #footer,
  .go-to-top,
  .mobile-menu-buttons,
  #sidebar {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .article,
  .entry-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* =====================================
   Reduced Motion
===================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .geometric-bg,
  .animated-lines {
    display: none;
  }
}

/* ヘッダー・フッター共通 */
.header,
#header,
.header-in,
#header-in {
  position: relative;
  z-index: 1000;
}

.footer,
#footer,
.footer-in,
#footer-in {
  position: relative;
  z-index: 100;
}

/* 幾何学背景をコンテンツの後ろに */
.geometric-bg,
.animated-lines-container {
  z-index: 0 !important;
}

.geo-shape {
  z-index: 0 !important;
  will-change: transform;
}

.animated-line {
  z-index: 1 !important;
  will-change: transform;
}

/* =====================================
   個別投稿ページ - 幾何学背景表示＆2カラム復元
===================================== */
/* 個別ページの背景を透明に（幾何学背景を見せる） */
body.single,
body.single-post,
body.page {
  background: transparent !important;
  background-color: transparent !important;
}

/* コンテンツラッパーを透明に */
.single .wrap,
.single-post .wrap,
.page .wrap,
.single .content-in,
.single-post .content-in,
.page .content-in,
.single #content,
.single-post #content,
.page #content,
.single .content,
.single-post .content,
.page .content {
  position: relative;
  z-index: 10;
  background: transparent !important;
  background-color: transparent !important;
}

/* PC表示で2カラム構造を強制（1024px以上）- bodyクラス明示で詳細度強化 */
@media screen and (min-width: 1024px) {
  body.single .content-in,
  body.single-post .content-in,
  body.page .content-in,
  body.home .content-in,
  body.front-page .content-in,
  body.blog .content-in,
  body.archive .content-in,
  body.category .content-in,
  body.tag .content-in,
  body.search .content-in,
  body.paged .content-in {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 32px;
    align-items: flex-start;
  }
  
  body.single #main,
  body.single-post #main,
  body.page #main,
  body.home #main,
  body.front-page #main,
  body.blog #main,
  body.archive #main,
  body.category #main,
  body.tag #main,
  body.search #main,
  body.paged #main,
  body.single .main,
  body.single-post .main,
  body.page .main,
  body.home .main,
  body.front-page .main,
  body.blog .main,
  body.archive .main,
  body.category .main,
  body.tag .main,
  body.search .main,
  body.paged .main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 332px) !important; /* サイドバー300px + gap32px */
  }
  
  body.single #sidebar,
  body.single-post #sidebar,
  body.page #sidebar,
  body.home #sidebar,
  body.front-page #sidebar,
  body.blog #sidebar,
  body.archive #sidebar,
  body.category #sidebar,
  body.tag #sidebar,
  body.search #sidebar,
  body.paged #sidebar {
    flex: 0 0 300px !important;
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
  }
}

/* メインコンテンツエリアも透明（bodyクラス明示） */
body.single #main,
body.single-post #main,
body.page #main,
body.home #main,
body.front-page #main,
body.blog #main,
body.archive #main,
body.category #main,
body.tag #main,
body.search #main,
body.paged #main,
body.single .main,
body.single-post .main,
body.page .main,
body.home .main,
body.front-page .main,
body.blog .main,
body.archive .main,
body.category .main,
body.tag .main,
body.search .main,
body.paged .main {
  position: relative;
  z-index: 10;
  background: transparent !important;
}

/* 記事コンテンツを確実に表示（白背景で前面に） */
.single .article,
.single-post .article,
.page .article {
  background: #ffffff !important;
  position: relative !important;
  z-index: 100 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  will-change: transform;
}

/* 記事内の全要素もopacity保証 */
.single .article-header,
.single .article-body,
.single .article-footer,
.single .entry-content,
.single .eye-catch,
.single-post .article-header,
.single-post .article-body,
.single-post .article-footer,
.single-post .entry-content,
.single-post .eye-catch {
  position: relative;
  z-index: 101;
  opacity: 1 !important;
  visibility: visible !important;
}

.single .entry-content,
.single-post .entry-content,
.page .entry-content {
  background: #ffffff !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* サイドバーも確実に表示 */
.single #sidebar,
.single-post #sidebar,
.page #sidebar,
.home #sidebar,
.archive #sidebar,
.category #sidebar,
body.tag #sidebar,
body.search #sidebar,
body.paged #sidebar {
  position: relative !important;
  z-index: 100 !important;
  display: block !important;
  visibility: visible !important;
  background: transparent !important;
}

/* ウィジェット - 3D深度強化版 */
body.single .widget,
body.single-post .widget,
body.page .widget,
body.home .widget,
body.front-page .widget,
body.blog .widget,
body.archive .widget,
body.category .widget,
body.tag .widget,
body.search .widget,
body.paged .widget {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  /* 多重シャドウによる浮遊感 */
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease !important;
}

/* ウィジェットホバー時の3D浮上効果 */
body.single .widget:hover,
body.single-post .widget:hover,
body.page .widget:hover,
body.home .widget:hover,
body.front-page .widget:hover,
body.blog .widget:hover,
body.archive .widget:hover,
body.category .widget:hover,
body.tag .widget:hover,
body.search .widget:hover,
body.paged .widget:hover {
  transform: translateY(-10px) rotateX(2deg) rotateY(-2deg) scale(1.02) !important;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.12),
    0 15px 30px rgba(0, 0, 0, 0.08),
    0 0 30px rgba(102, 126, 234, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* fade-in-elementクラスが付いても個別ページの.articleは即座に表示 */
.single .article.fade-in-element,
.single-post .article.fade-in-element,
.page .article.fade-in-element {
  opacity: 1 !important;
  transform: none !important;
}

/* =====================================
   検索フォームのUI刷新（見切れ修正と3D化）
===================================== */
.search-form {
  background: #f1f5f9;
  border-radius: var(--radius-full);
  padding: 4px !important;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0;
  width: 100%;
  height: 54px; /* 記事タイトルエリアとバランスの取れる高さに調整 */
  box-sizing: border-box;
}

.search-form input[type="text"],
.search-form .search-edit {
  background: transparent !important;
  border: none !important;
  padding: 10px 15px !important;
  font-size: 16px !important; /* 入力文字を見やすく */
  flex: 1 1 auto !important;
  min-width: 180px !important; /* 入力欄の幅を十分に確保 */
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  outline: none;
  color: var(--text-primary);
}

.search-form input[type="text"]:focus,
.search-form .search-edit:focus {
  outline: none;
  box-shadow: none !important;
}

.search-form button,
.search-form .search-submit {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  border-radius: var(--radius-full) !important;
  padding: 0 20px !important;
  min-width: 80px !important;
  box-shadow: var(--shadow-sm) !important;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-form button:hover,
.search-form .search-submit:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md) !important;
}

/* サイドバー内検索フォーム - 視認性向上（完全版） */
#sidebar .search-form,
.sidebar .search-form {
  max-width: 100%;
}

#sidebar .search-form input[type="text"],
#sidebar .search-form .search-edit,
.sidebar .search-form input[type="text"],
.sidebar .search-form .search-edit {
  font-size: 16px !important;
  padding: 10px 15px !important;
  min-width: 180px !important; /* 入力欄の幅を十分に確保 */
  flex: 1 !important;
}

/* 全ページ共通：検索フォームの入力欄を使いやすく */
.search-form .search-edit {
  min-width: 180px !important;
  flex: 1 !important;
}

/* トップページ検索ボックスのアニメーション基点を修正 */
body.home #sidebar .widget_search,
body.front-page #sidebar .widget_search,
body.blog #sidebar .widget_search {
  animation: searchAttention 0.4s ease-out forwards !important;
}

@keyframes searchAttention {
  0% {
    opacity: 0;
    transform: translateY(0); /* 上から降ろさず、その場でフェードイン */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 検索フォーム自体にも微妙なパルス効果 */
body.home #sidebar .search-form,
body.front-page #sidebar .search-form,
body.blog #sidebar .search-form {
  animation: searchPulse 2s ease-in-out 1.5s;
}

@keyframes searchPulse {
  0%, 100% {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(0,0,0,0.05),
      0 0 20px rgba(102, 126, 234, 0.3);
  }
}

/* =====================================
   リンクテキストの3Dアンダーライン装飾
===================================== */
.entry-content a:not(.myppc-btn):not(.btn):not([class*="button"]) {
  position: relative;
  color: var(--color-indigo);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

.entry-content a:not(.myppc-btn):not(.btn):not([class*="button"])::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-warm);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}

.entry-content a:not(.myppc-btn):not(.btn):not([class*="button"]):hover {
  color: var(--color-pink);
}

.entry-content a:not(.myppc-btn):not(.btn):not([class*="button"]):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 画像リンクにはアンダーラインを適用しない */
.entry-content a:has(img)::after {
  display: none;
}

/* =================================================================
   【最終修正版】トップページ・個別記事の完全位置合わせ
   ※ 既存の設定をすべて無効化し、物理的に強制配置します
   ================================================================= */

@media screen and (min-width: 1024px) {
  
  /* 1. コンテナ同士の整列設定を強制リセット */
  .content-in {
    align-items: flex-start !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    gap: 32px; /* 横の間隔は維持 */
  }
  
  #main, #sidebar {
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0 !important;
  }

  /* 2. 記事カード（左）の完全上端固定 */
  #main > .entry-card-wrap:first-child,
  #main > .article:first-child,
  #main > div:first-child {
    margin-top: 0 !important;
    transform: none !important; /* JSによるズレを防止 */
  }

  /* 3. サイドバー最初のウィジェットの強制リセット */
  #sidebar .widget:first-child {
    margin-top: 0 !important;
    padding: 0 !important; /* 親枠のパディングを完全除去 */
    top: 0 !important;
    
    /* JSアニメーション・3D効果による位置ズレをすべて無効化 */
    transform: none !important; 
    animation: none !important;
    transition: none !important;
    
    /* 影の広がりによる視覚的ズレを補正 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
  }

  /* 4. ウィジェット内部の全要素（div, form等）のトップ余白を抹消 */
  /* ここが原因で8pxの隙間が残っていました */
  #sidebar .widget:first-child > *,
  #sidebar .widget:first-child > div,
  #sidebar .widget:first-child > form,
  #sidebar .widget:first-child .search-form,
  #sidebar .widget:first-child .widget_search {
    padding-top: 0 !important;
    margin-top: 0 !important;
    top: 0 !important;
  }

  /* 5. 検索フォーム自体の位置合わせ */
  /* 記事カードの4pxカラーバー、ウィジェットの1px枠線を考慮し、物理的に合わせる */
  #sidebar .widget:first-child .search-form {
    height: 54px !important; /* カードヘッダーとバランスの取れる高さ */
    box-sizing: border-box !important;
    position: relative !important;
    
    /* 【微調整値】 
       ズレが直らない場合はここを -1px, -2px と変更してください。
       現在はウィジェット枠線(1px)を相殺する設定です。 */
    top: -1px !important; 
    
    /* フォーム自体の余白除去 */
    padding: 4px !important;
    margin: 0 !important;
  }

  /* 6. 入力欄のデザイン固定 */
  #sidebar .widget:first-child .search-form input[type="text"],
  #sidebar .widget:first-child .search-form .search-edit {
    margin: 0 !important;
    height: auto !important;
  }
}

/* 7. JSが付与するクラスによる強制移動（20pxダウン）を、最初のウィジェットだけ無効化 */
#sidebar .widget:first-child.fade-in-element {
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* 8. アニメーション定義の上書き（念のため） */
@keyframes searchAttention {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
