/* 相続屋®コラム：ダークモード（まどぐちの暗い版）2026-11-27 */

/* ---- 切り替えボタン（ライト・ダーク共通） ---- */
.cm-theme-btn{flex:none;display:inline-grid;place-items:center;width:40px;height:40px;margin:0 0 0 10px;padding:0;border:1px solid var(--md-line);border-radius:999px;background:var(--md-bg);color:var(--md-ink);cursor:pointer;align-self:center;transition:background .2s,border-color .2s}
.cm-theme-btn:hover{border-color:var(--md-primary);background:var(--md-primary-tint)}
.cm-theme-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:959px){
  .l-header__inner .cm-theme-btn{order:3;margin:0 2px 0 auto;width:38px;height:38px}
  .l-header__inner .cm-theme-btn + .l-header__customBtn,.l-header__inner .cm-theme-btn + .l-header__menuBtn{margin-left:0}
  .l-fixHeader__inner .cm-theme-btn{display:none}
}

/* ---- 色（ダーク） ---- */
html[data-theme="dark"]{
  color-scheme:dark;
  --md-bg:#141a1a;
  --md-surface:#1a2221;
  --md-beige:#211f1b;
  --md-primary-tint:#1f3331;
  --md-ink:#e6ecea;
  --md-ink-soft:#c5cecc;
  --md-muted:#a3b0ad;
  --md-primary:#5fb0a8;
  --md-primary-dark:#80c7c0;
  --md-on-primary:#0e1c1b;
  --md-caution:#e0a35a;
  --md-line:#2f3b3a;
  --md-border-input:#62726f;
  --md-focus:#80c7c0;
  --md-shadow-card:0 2px 12px rgba(0,0,0,.35);

  --color_bg:#141a1a;
  --color_content_bg:#141a1a;
  --color_text:#e6ecea;
  --color_link:#80c7c0;
  --color_main:#5fb0a8;
  --color_main_dark:#80c7c0;
  --color_main_thin:rgba(95,176,168,.10);
  --color_htag:#5fb0a8;
  --color_header_bg:#141a1a;
  --color_header_text:#e6ecea;
  --color_footer_bg:#0e1313;
  --color_footer_text:#e6ecea;
  --color_gradient1:#1f3331;
  --color_gradient2:#5fb0a8;
  --color_border:hsla(0,0%,100%,.14);
  --color_border--table:#34403f;
  --color_gray:hsla(0,0%,100%,.06);
  --color_pale01:#2a1f1d;
  --color_pale02:#1b2430;
  --color_pale03:#1c2a1d;
  --color_pale04:#2a271c;
  --color_icon_book_bg:#25231e;
  --color_icon_pen_bg:#1f2423;
  --color_icon_good_bg:#1b2a1c;
  --color_icon_bad_bg:#1a2530;
  --color_icon_info_bg:#2a1d25;
  --color_icon_announce_bg:#2b231c;
  --swl-text_color--black:#e6ecea;
  --swl-color_hov_gray:rgba(255,255,255,.06);
  --swl-color_shadow:rgba(0,0,0,.4);
}
html[data-theme="dark"] body{background:var(--md-bg);color:var(--md-ink)}

/* SWELL が白を直接指定している所 */
html[data-theme="dark"] .l-header,
html[data-theme="dark"] .l-fixHeader,
html[data-theme="dark"] .p-spMenu__inner,
html[data-theme="dark"] .c-gnav .sub-menu,
html[data-theme="dark"] .p-searchModal__inner,
html[data-theme="dark"] .c-modal__inner{background:var(--md-bg);color:var(--md-ink)}
html[data-theme="dark"] .c-gnav .sub-menu a{color:var(--md-ink)}
html[data-theme="dark"] .c-gnav .sub-menu a:hover{background:var(--md-surface)}
html[data-theme="dark"] .l-header{border-bottom:1px solid var(--md-line)}
html[data-theme="dark"] .c-headLogo__link,html[data-theme="dark"] .c-gnav > li > a{color:var(--md-ink)}
html[data-theme="dark"] .l-footer a{color:var(--color_footer_text)}
html[data-theme="dark"] .p-breadcrumb,html[data-theme="dark"] .p-breadcrumb.-bg-on{background:var(--md-surface)}
html[data-theme="dark"] .p-breadcrumb__text,html[data-theme="dark"] .p-breadcrumb__item{color:var(--md-muted)}
html[data-theme="dark"] #fix_bottom_menu{color:var(--md-primary-dark)}
html[data-theme="dark"] #fix_bottom_menu::before{background:var(--md-bg);opacity:.96;box-shadow:0 -1px 0 var(--md-line)}

/* 本文・表・目次・ボックス */
html[data-theme="dark"] .post_content table th{background:var(--md-surface);color:var(--md-ink)}
html[data-theme="dark"] .post_content table td{background:var(--md-bg)}
html[data-theme="dark"] .p-toc,html[data-theme="dark"] .p-toc.-border,html[data-theme="dark"] .p-toc.-simple{background:var(--md-surface);border-color:var(--md-line)}
html[data-theme="dark"] .p-blogParts,html[data-theme="dark"] .p-authorBox,html[data-theme="dark"] .c-balloon__text,html[data-theme="dark"] .swell-block-faq__item,html[data-theme="dark"] .is-style-bg_gray,html[data-theme="dark"] .has-swl-gray-background-color{background:var(--md-surface);color:var(--md-ink)}
html[data-theme="dark"] .p-postList__body,html[data-theme="dark"] .p-postList__title,html[data-theme="dark"] .c-postTitle__ttl,html[data-theme="dark"] .c-pageTitle{color:var(--md-ink)}
html[data-theme="dark"] .post_content a{color:var(--color_link)}
html[data-theme="dark"] mark,html[data-theme="dark"] .mark_yellow{background:linear-gradient(transparent 60%,rgba(240,216,80,.35) 0);color:inherit}

/* 入力欄 */
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{background:var(--md-bg);color:var(--md-ink);border-color:var(--md-border-input)}
html[data-theme="dark"] ::placeholder{color:var(--md-muted)}

/* 写真は少しだけ明るさを落とす（図の文字は読めるまま） */
html[data-theme="dark"] .post_content img,html[data-theme="dark"] .cm-fv-media img,html[data-theme="dark"] .p-postList__thumb img{filter:brightness(.92)}

/* 検索候補の「下書き」札 */
html[data-theme="dark"] .cm-top .cm-sugg-list a em{background:#4a3a1a;color:#f4dfb5}
