/* =========================
   Dark fixed base
========================= */
:root { color-scheme: dark; }

html, body {
  background: #0f0f10;
  color: #e6e6e6;
}

a { color: #8ab4ff; }
a:hover { opacity: .9; }

hr { border-color: rgba(255,255,255,.15); }

/* =========================
   Gutenberg / post content
========================= */
.entry-content,
.wp-block-post-content {
  color: inherit;
}

/* ブロックが勝手に付ける背景指定（has-background）をダーク寄せ */
.entry-content .has-background,
.wp-block-post-content .has-background {
  background-color: rgba(255,255,255,.06) !important;
  color: inherit !important;
}

/* さらに強い：インライン style で白系が書かれた場合の保険 */
.entry-content [style*="background:#fff"],
.entry-content [style*="background: #fff"],
.entry-content [style*="background-color:#fff"],
.entry-content [style*="background-color: #fff"],
.entry-content [style*="background-color:rgb(255,255,255)"],
.entry-content [style*="background-color: rgb(255,255,255)"]{
  background-color: rgba(255,255,255,.06) !important;
  color: inherit !important;
}

/* 例外：明示的に白い箱を使いたい場合 */
.entry-content .is-style-light-box,
.wp-block-post-content .is-style-light-box {
  background: #fff !important;
  color: #111 !important;
}

:root { color-scheme: dark; }

/* 文字色 */
body,
.post_contents,
.post_title,
.widget_title,
header a,
.f_credit_wrap a,
.m_menu a {
  color: #bdc1c6 !important;
}

/* 背景（箱） */
body { background: #202124 !important; }
.post_contents { background: #303134 !important; }

.h_wrap,
#menu_f,
.fix_footer,
.s_widget,
.f_widget,
.index_card,
.toc,
.blog_card,
.nav-links .number:not(.current),
#site_f {
  background: #171717 !important;
}

/* リンク */
a { color: #48a1ff !important; }
a:hover { color: #2997ff !important; }

/* 入力欄 */
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="number"], input[type="tel"], textarea {
  background: #222 !important;
  color: #bdc1c6 !important;
}

/* LaidBack：sub_fc 系の文字色を常にダーク基準にする */
body,
.sub_fc,
header a,
.f_credit_wrap a,
.m_menu a,
.post_title,
.widget_title,
.nav-links .number:not(.current) {
  color: #bdc1c6 !important;
}

/* 通常リンクは青 */
.entry-content a,
.site a {
  color: #48a1ff !important;
}

/* ソーシャルリンクはアイコン色を本文色に戻す（青にしない） */
.wp-block-social-links .wp-block-social-link a,
.wp-block-social-links .wp-block-social-link-anchor {
  /*color: #bdc1c6 !important;*/
color: #ffffff !important;
}

/* SVGがリンク色を継承している場合に確実に効かせる */
.wp-block-social-links .wp-block-social-link-anchor svg,
.wp-block-social-links .wp-block-social-link-anchor svg path {
  fill: currentColor !important;
}

/* 見出し・タイトル系はリンク青の影響を受けないように本文色へ固定 */
.post_body h2,
.post_body h3,
.post_body h4,
.post_body h5,
.post_body h6,
.paper-title {
  color: #bdc1c6 !important;
}

/* 見出し内のリンクは青にしたいなら（必要なら） */
.post_body h2 a,
.post_body h3 a,
.post_body h4 a,
.post_body h5 a,
.post_body h6 a,
.paper-title a {
  color: #48a1ff !important;
}

/* =========================
   Table（表）
========================= */

/* 表全体の文字色 */
.entry-content table,
.wp-block-post-content table {
  color: #bdc1c6 !important;
  background: transparent !important;
}

/* 交互の行背景（ダーク時の指定を常時化） */
.entry-content tbody tr:nth-child(odd),
.wp-block-post-content tbody tr:nth-child(odd) {
  background: #202124 !important;
}

/* 偶数行は少しだけ分けたい場合（任意） */
.entry-content tbody tr:nth-child(even),
.wp-block-post-content tbody tr:nth-child(even) {
  background: transparent !important;
}

/* 罫線がライトのまま残ることが多いので統一 */
.entry-content table,
.entry-content th,
.entry-content td,
.wp-block-post-content table,
.wp-block-post-content th,
.wp-block-post-content td {
  border-color: rgba(255,255,255,.15) !important;
}

/* =========================
   Blockquote（引用）
========================= */
.entry-content blockquote,
.wp-block-post-content blockquote {
  background: #202124 !important; /* ダーク時の背景を常時化 */
  color: #bdc1c6 !important;
  border-color: rgba(255,255,255,.2) !important;
}

/* 引用（blockquote）を常時ダーク化：LaidBackの本文クラスに合わせて指定 */
.post_body blockquote,
.post_contents blockquote,
blockquote {
  background: #202124 !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  color: #bdc1c6 !important;
}

/* 引用の “カギカッコ装飾” の色（before/after）が薄すぎ/ライト寄りになる対策 */
.post_body blockquote::before,
.post_body blockquote::after,
blockquote::before,
blockquote::after {
  color: rgba(255,255,255,.18) !important;
}

/* =========================
   Tables: always dark
========================= */

/* 表全体（本文領域） */
.post_body table,
.post_body .wp-block-table table,
.post_contents table,
.post_contents .wp-block-table table {
  color: #bdc1c6 !important;
  background: transparent !important;
}

/* 罫線（ライトの #f2f2f2 / #e3e7ed を潰す） */
.post_body th, .post_body td,
.post_contents th, .post_contents td,
.post_body .wp-block-table th, .post_body .wp-block-table td,
.post_contents .wp-block-table th, .post_contents .wp-block-table td {
  border-color: rgba(255,255,255,.15) !important;
  background: transparent !important; /* ここがないとセル側で白っぽく見えることがある */
}

/* 交互背景：行だけでなく「セル」にも付ける（表示の確実性UP） */
.post_body tbody tr:nth-child(odd) td,
.post_contents tbody tr:nth-child(odd) td,
.post_body .wp-block-table tbody tr:nth-child(odd) td,
.post_contents .wp-block-table tbody tr:nth-child(odd) td {
  background: #202124 !important;
}

/* カテゴリ/タグ（post_cat/post_tag）を常にダーク背景に固定 */
.post_cat,
.post_tag {
  background: #171717 !important;
  color: #bdc1c6 !important;
}

/* post_cat が a 要素（リンク）として出ている場合の保険 */
a.post_cat,
a.post_tag,
.post_cat a,
.post_tag a {
  color: #bdc1c6 !important;
}

/* 隣接記事カード（.adjacent）をライト扱いでも常にダーク背景へ */
.adjacent,
.adjacent.flow_box,
.adjacent.shadow_box {
  background: #171717 !important;
  color: #bdc1c6 !important;
}

/* カード内リンク/テキストもダーク基準に */
.adjacent a {
  color: #bdc1c6 !important;
}
.adjacent a:hover {
  color: #8ab4ff !important;
}

/* サムネ領域が白っぽく見える場合の保険（画像ラップ） */
.adjacent_thum,
.adjacent_thum .fit_box_img_wrap {
  background: transparent !important;
}





