/* WordPressコンテンツ用スタイル */

/* 基本的な段落スタイル - 原稿サイト .cms p の margin:0 と同期 */
.x.cms .d1-1 p {
  margin: 0 !important;
  color: #333 !important;
}

/* text-alignスタイルを保持 */
.x.cms .d1-1 p[style*="text-align: left"] {
  text-align: left !important;
}

.x.cms .d1-1 p[style*="text-align: center"] {
  text-align: center !important;
}

.x.cms .d1-1 p[style*="text-align: right"] {
  text-align: right !important;
}

/* 見出しスタイル */
.x.cms .d1-1 h1,
.x.cms .d1-1 h2,
.x.cms .d1-1 h3,
.x.cms .d1-1 h4,
.x.cms .d1-1 h5,
.x.cms .d1-1 h6 {
  margin: 1.2em 0 0.4em 0 !important;
  line-height: 1.3 !important;
  color: #2e7d32;
  font-weight: bold !important;
}

/* 投稿コンテンツ（WordPress本文）の見出しは投稿者の指定を尊重し、
   無指定時は本文色を既定にする（緑の強制適用を解除） */
.x.cms .d1-1 .wp-post-content h1,
.x.cms .d1-1 .wp-post-content h2,
.x.cms .d1-1 .wp-post-content h3,
.x.cms .d1-1 .wp-post-content h4,
.x.cms .d1-1 .wp-post-content h5,
.x.cms .d1-1 .wp-post-content h6 {
  color: #333;
}

.x.cms .d1-1 h1 { font-size: 1.8em !important; }
.x.cms .d1-1 h2 { font-size: 1.6em !important; }
.x.cms .d1-1 h3 { font-size: 1.4em !important; }
.x.cms .d1-1 h4 { font-size: 1.2em !important; }
.x.cms .d1-1 h5 { font-size: 1.1em !important; }
.x.cms .d1-1 h6 { font-size: 1em !important; }

/* 強調テキスト - 色を黒に固定 */
.x.cms .d1-1 strong {
  font-weight: bold !important;
  color: #333 !important;
}

.x.cms .d1-1 em {
  font-style: italic !important;
}

/* リンクスタイル */
.x.cms .d1-1 a {
  color: #2e7d32 !important;
  text-decoration: underline !important;
  transition: color 0.3s ease;
}

.x.cms .d1-1 a:hover {
  color: #1b5e20 !important;
  text-decoration: none !important;
}

/* リストスタイル - 余白を調整 */
.x.cms .d1-1 ul,
.x.cms .d1-1 ol {
  margin: 0.6em 0 !important;
  padding-left: 2em !important;
}

.x.cms .d1-1 li {
  margin: 0.3em 0 !important;
  line-height: 1.6 !important;
}

/* 画像スタイル */
.x.cms .d1-1 img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 画像の中央寄せ */
.x.cms .d1-1 .aligncenter {
  display: block !important;
  margin: 0.5em auto !important;
  text-align: center !important;
}

.x.cms .d1-1 .alignleft {
  float: left !important;
  margin: 0 1em 0.5em 0 !important;
}

.x.cms .d1-1 .alignright {
  float: right !important;
  margin: 0 0 0.5em 1em !important;
}

/* 引用スタイル */
.x.cms .d1-1 blockquote {
  margin: 1em 0 !important;
  padding: 0.8em 1.2em !important;
  border-left: 4px solid #2e7d32 !important;
  background-color: #f5f5f5 !important;
  font-style: italic !important;
  color: #555 !important;
}

/* テーブルスタイル */
.x.cms .d1-1 table {
  width: 100% !important;
  margin: 0.8em 0 !important;
  border-collapse: collapse !important;
  border: 1px solid #ddd !important;
}

.x.cms .d1-1 th,
.x.cms .d1-1 td {
  padding: 0.5em !important;
  text-align: left !important;
  border: 1px solid #ddd !important;
}

.x.cms .d1-1 th {
  background-color: #f8f9fa !important;
  font-weight: bold !important;
  color: #2e7d32 !important;
}

.x.cms .d1-1 tr:nth-child(even) {
  background-color: #f8f9fa !important;
}

/* コードスタイル */
.x.cms .d1-1 code {
  background-color: #f4f4f4 !important;
  padding: 0.2em 0.4em !important;
  border-radius: 3px !important;
  font-family: 'Courier New', monospace !important;
  font-size: 0.9em !important;
}

.x.cms .d1-1 pre {
  background-color: #f4f4f4 !important;
  padding: 0.8em !important;
  border-radius: 4px !important;
  overflow-x: auto !important;
  margin: 0.8em 0 !important;
}

.x.cms .d1-1 pre code {
  background: none !important;
  padding: 0 !important;
}

/* 改行の調整 - brタグの余白を削減 */
.x.cms .d1-1 br {
  line-height: 1.2 !important;
}

/* WordPressのギャラリー対応 */
.x.cms .d1-1 .gallery {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.8em !important;
  margin: 0.8em 0 !important;
}

.x.cms .d1-1 .gallery-item {
  flex: 1 !important;
  min-width: 200px !important;
}

/* 日付表示の調整 */
.x.prop .t1 .publish {
  vertical-align: middle !important;
  padding: 0.5em 0 !important;
}

/* 全体的な余白の調整 */
.x.cms .d1-1 {
  line-height: 1.6 !important;
}

/* 色付きテキストを保持（WordPressで設定された色を維持） */
.x.cms .d1-1 span[style*="color: #0000ff"] {
  color: #0000ff !important;
}

.x.cms .d1-1 span[style*="color: #ff0000"] {
  color: #ff0000 !important;
}

.x.cms .d1-1 span[style*="color: blue"] {
  color: blue !important;
}

.x.cms .d1-1 span[style*="color: red"] {
  color: red !important;
}

/* 強調テキスト内のspanタグの色を保持 */
.x.cms .d1-1 strong span[style*="color"] {
  /* 元の色を保持 - strongの色設定を上書きしない */
}

/* 背景色対応 */
.x.cms .d1-1 span[style*="background"] {
  padding: 0.2em 0.4em !important;
  border-radius: 3px !important;
}

/* 特殊文字・絵文字の表示改善 */
.x.cms .d1-1 {
  font-feature-settings: "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
}

/* 装飾線（✼••┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈••✼）の表示改善 */
.x.cms .d1-1 p:contains("✼••") {
  text-align: center !important;
  font-family: monospace !important;
  letter-spacing: 0.1em !important;
  margin: 1em 0 !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  /* .x.cms .d1-1 {
    font-size: 0.9em !important;
  } */
  
  .x.cms .d1-1 h1 { font-size: 1.6em !important; }
  .x.cms .d1-1 h2 { font-size: 1.4em !important; }
  .x.cms .d1-1 h3 { font-size: 1.2em !important; }
  
  .x.cms .d1-1 .alignleft,
  .x.cms .d1-1 .alignright {
    float: none !important;
    display: block !important;
    margin: 0.5em auto !important;
  }
  
  .x.cms .d1-1 table {
    font-size: 0.8em !important;
  }
  
  .x.cms .d1-1 .gallery-item {
    min-width: 150px !important;
  }
}

/* 特定のWordPressクラス対応 */
.x.cms .d1-1 .wp-caption {
  max-width: 100% !important;
}

.x.cms .d1-1 .wp-caption-text {
  font-size: 0.9em !important;
  color: #666 !important;
  text-align: center !important;
  margin-top: 0.3em !important;
  font-style: italic !important;
} 
