@charset "UTF-8";

/*
 * MonoDeck dark mode
 * Arkheの色変数を中心に切り替え、
 * 個別に白が固定されている部品だけを補正する。
 */

:root {
  --monodeck-dark-bg: #1c1d1f;
  --monodeck-dark-bg-deep: #17181a;
  --monodeck-dark-surface: #242629;
  --monodeck-dark-surface-soft: #2a2c30;
  --monodeck-dark-text: #d9dbde;
  --monodeck-dark-heading: #f2f3f4;
  --monodeck-dark-muted: #a8adb3;
  --monodeck-dark-link: #83bfff;
  --monodeck-dark-emphasis: #f2a97e;
  --monodeck-dark-border: rgba(255, 255, 255, 0.16);
  --monodeck-dark-table-border: #414449;
}

html[data-monodeck-theme="dark"] {
  color-scheme: dark;
  --ark-color--main: #f2f3f4;
  --ark-color--text: #d9dbde;
  --ark-color--link: #83bfff;
  --ark-color--bg: #1c1d1f;
  --ark-color--gray: #26282b;
  --ark-color--gray--hover: rgba(255, 255, 255, 0.06);
  --ark-color--border: rgba(255, 255, 255, 0.16);
  --ark-color--border--table: #414449;
  --ark-color--header_bg: rgba(28, 29, 31, 0.72);
  --ark-color--header_txt: #f2f3f4;
  --ark-color--footer_bg: #17181a;
  --ark-color--footer_txt: #c9ccd0;
  --monodeck-body-color: #d9dbde;
  --monodeck-heading-primary-color: #f2f3f4;
  --monodeck-heading-secondary-color: #e5e7e9;
  --monodeck-heading-rule-color: #4a4d52;
}

html[data-monodeck-theme="dark"] body {
  color: var(--ark-color--text);
  background-color: var(--ark-color--bg);
}

/*
 * 初期表示のフォント切り替わりを覆うページカーテン（2026-08-15ターミナル風に刷新）。
 * 斜めにスキューした面が右へ抜け、後端に緑のライン、左下にターミナルカーソルが点滅する。
 * 表示時間の予算は従来と同じ（フォント待ち最大500ms・退場0.34s・failsafe 1.2s）。
 */
.monodeck-page-curtain {
  position: fixed;
  z-index: 2147482000;
  top: 0;
  bottom: 0;
  left: -18%;
  width: 136%;
  display: block;
  background: var(--monodeck-dark-bg, #1c1d1f);
  opacity: 1;
  transform: skewX(-6deg);
  transform-origin: center;
  pointer-events: auto;
  will-change: transform, opacity;
  transition:
    transform 0.34s cubic-bezier(0.7, 0, 0.3, 1),
    opacity 0.2s linear 0.12s;
  animation: monodeck-page-curtain-failsafe 0.01s step-end 1.2s forwards;
}

/* 退場: 斜めのまま右へ走り抜ける */
.monodeck-page-curtain.is-leaving {
  transform: translateX(120%) skewX(-6deg);
  opacity: 0;
}

/* 幕の後端（左端）: ターミナルの緑が尾を引く */
.monodeck-page-curtain::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(52, 199, 123, 0.45);
  opacity: 0;
}

.monodeck-page-curtain.is-leaving::after {
  opacity: 0.35;
}

/* 左下のターミナルカーソル（幕のスキューを打ち消して直立させる） */
.monodeck-page-curtain::before {
  content: "▊";
  position: absolute;
  left: calc(18% + 28px);
  bottom: 26px;
  color: rgba(52, 199, 123, 0.6);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1;
  transform: skewX(6deg);
  opacity: 0;
  animation: monodeck-curtain-caret 0.9s step-end 0.25s infinite;
}

.monodeck-page-curtain.is-leaving::before {
  visibility: hidden;
}

@keyframes monodeck-curtain-caret {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.08; }
}

@keyframes monodeck-page-curtain-failsafe {
  to {
    visibility: hidden;
    opacity: 0;
    transform: translateX(120%) skewX(-6deg);
    pointer-events: none;
  }
}

html[data-monodeck-theme="dark"] .l-header,
html[data-monodeck-theme="dark"] .l-header__under {
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

html[data-monodeck-theme="dark"] .l-header {
  background-color: rgba(28, 29, 31, 0.72);
  -webkit-backdrop-filter: saturate(135%) blur(20px);
  backdrop-filter: saturate(135%) blur(20px);
}

html[data-monodeck-theme="dark"].monodeck-header-hidden .l-header {
  opacity: 0;
  transform: translateY(-150%);
  pointer-events: none;
}

/*
 * Arkheのドロワーはヘッダー内にあるposition: fixed要素。
 * backdrop-filterやtransform用の合成レイヤーが有効なままだと、
 * 固定配置の基準が画面ではなくヘッダーになり、メニュー本体が切れてしまう。
 * ドロワーを開いている間だけその包含ブロックを解除する。
 */
html[data-monodeck-theme="dark"][data-drawer="opened"] .l-header {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  will-change: auto;
}

html[data-monodeck-theme="dark"] .l-footer {
  border-color: var(--monodeck-dark-border);
}

html[data-monodeck-theme="dark"] .c-breadcrumb,
html[data-monodeck-theme="dark"] .p-entry__meta,
html[data-monodeck-theme="dark"] .p-postList__excerpt,
html[data-monodeck-theme="dark"] figcaption,
html[data-monodeck-theme="dark"] .wp-element-caption {
  color: var(--monodeck-dark-muted);
}

html[data-monodeck-theme="dark"] .c-postTerms__link {
  color: var(--monodeck-dark-text);
  background-color: var(--monodeck-dark-surface);
}

html[data-monodeck-theme="dark"] hr,
html[data-monodeck-theme="dark"] .p-postList > li,
html[data-monodeck-theme="dark"] .p-relatedPosts__list > li {
  border-color: var(--monodeck-dark-border);
}

/* ページ送り。選択中・ホバー時の白背景に白文字が重ならないようにする。 */
html[data-monodeck-theme="dark"] .pagination .page-numbers:not(.dots).current,
html[data-monodeck-theme="dark"] .pagination .page-numbers:not(.dots):hover,
html[data-monodeck-theme="dark"] .post-page-numbers:not(.dots).current,
html[data-monodeck-theme="dark"] .post-page-numbers:not(.dots):hover {
  color: var(--monodeck-dark-bg);
}

/* 標準の表。セルに明示的な背景色がある場合は、その色を尊重する。 */
html[data-monodeck-theme="dark"] .c-postContent table {
  color: var(--monodeck-dark-text);
  border-color: var(--monodeck-dark-table-border);
}

html[data-monodeck-theme="dark"] .c-postContent table th:not([style*="background"]),
html[data-monodeck-theme="dark"] .c-postContent table td:not([style*="background"]) {
  color: var(--monodeck-dark-text);
  background-color: transparent;
  border-color: var(--monodeck-dark-text);
}

html[data-monodeck-theme="dark"] .c-postContent table th:not([style*="background"]) {
  color: var(--monodeck-dark-heading);
  background-color: var(--monodeck-dark-surface-soft);
}

html[data-monodeck-theme="dark"] .c-postContent .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background-color: transparent;
}

/* Arkhe Blocksの番号付きリスト。数字マーカーは本文と同じ白系へ揃える。 */
html[data-monodeck-theme="dark"] .c-postContent .is-style-ark-list-numbered > li::before {
  box-sizing: border-box;
  color: var(--monodeck-dark-text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Arkhe Blocksの箱型タブ。選択中も暗色面を保ち、細いアクセント線で状態を示す。 */
html[data-monodeck-theme="dark"] .c-postContent .ark-block-tab.is-style-box .arkb-tabList__button {
  color: var(--monodeck-dark-text);
  background: var(--monodeck-dark-surface);
  border-color: var(--monodeck-dark-border);
  box-shadow: none;
}

html[data-monodeck-theme="dark"] .c-postContent .ark-block-tab.is-style-box .arkb-tabList__button:hover {
  color: var(--monodeck-dark-heading);
  background: var(--monodeck-dark-surface-soft);
}

html[data-monodeck-theme="dark"] .c-postContent .ark-block-tab.is-style-box .arkb-tabList__button[aria-selected="true"] {
  color: var(--monodeck-dark-heading);
  background: #303338;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 -2px 0 var(--monodeck-dark-emphasis);
}

html[data-monodeck-theme="dark"] .c-postContent .ark-block-tab.is-style-box .arkb-tabList__button:focus-visible {
  outline: 2px solid var(--monodeck-dark-link);
  outline-offset: 2px;
}

html[data-monodeck-theme="dark"] .c-postContent .ark-block-tab.is-style-box .arkb-tabBody {
  border-color: var(--monodeck-dark-border);
}

/* 薄灰色のグループスタイル。固定の#f5f5f5をダーク面へ置き換える。 */
html[data-monodeck-theme="dark"] .c-postContent .wp-block-group.is-style-gray-bg {
  color: var(--monodeck-dark-text);
  background-color: var(--monodeck-dark-surface);
  border-color: var(--monodeck-dark-border);
}

/* 標準テーブル。通常セルはページ背景へ溶け込ませ、見出しだけを暗色面で区別する。 */
html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) {
  overflow-x: auto;
  background: transparent;
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) table {
  margin: 0;
  background: transparent;
  border: 1px solid var(--monodeck-dark-text) !important;
  border-collapse: collapse;
  border-spacing: 0;
  border-radius: 0 !important;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) :is(th, td) {
  border: 1px solid var(--monodeck-dark-text) !important;
  border-radius: 0 !important;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) thead th:not([style*="background"]) {
  color: var(--monodeck-dark-heading);
  background: #2d3035;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) tbody th:not([style*="background"]) {
  color: var(--monodeck-dark-heading);
  background: #2d3035;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) tbody > tr:first-child > th:not([style*="background"]) {
  color: var(--monodeck-dark-heading);
  background: #2d3035;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) tbody td:not([style*="background"]) {
  background: transparent;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) tbody tr:nth-child(even) td:not([style*="background"]) {
  background: transparent;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) tbody tr:hover td:not([style*="background"]) {
  background: transparent;
}

/* 見出し行・列と通常セルの境界だけを2pxにして、表の方向を追いやすくする。 */
html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) thead > tr:last-child > :is(th, td),
html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) table:not(:has(thead)) > tbody > tr:first-child > th {
  border-bottom-width: 2px !important;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) tbody tr > th:last-of-type:not(:last-child) {
  border-right-width: 2px !important;
}

html[data-monodeck-theme="dark"] .c-postContent :is(.wp-block-table, .wp-block-flexible-table-block-table) figcaption {
  padding: 8px 12px;
  color: var(--monodeck-dark-muted);
  background: transparent;
}

/* 引用・コード・検索・フォーム。 */
html[data-monodeck-theme="dark"] .c-postContent blockquote,
html[data-monodeck-theme="dark"] .c-postContent pre,
html[data-monodeck-theme="dark"] .c-postContent code,
html[data-monodeck-theme="dark"] .p-authorBox {
  color: var(--monodeck-dark-text);
  background-color: var(--monodeck-dark-surface);
  border-color: var(--monodeck-dark-border);
}

html[data-monodeck-theme="dark"] .c-postContent blockquote {
  padding: 1.1em 1.5em;
}

html[data-monodeck-theme="dark"] body:not(.wp-admin) input:not([type="submit"]):not([type="button"]):not([type="reset"]),
html[data-monodeck-theme="dark"] body:not(.wp-admin) textarea,
html[data-monodeck-theme="dark"] body:not(.wp-admin) select {
  color: var(--monodeck-dark-text);
  background-color: var(--monodeck-dark-surface);
  border-color: var(--monodeck-dark-border);
}

html[data-monodeck-theme="dark"] body:not(.wp-admin) input::placeholder,
html[data-monodeck-theme="dark"] body:not(.wp-admin) textarea::placeholder {
  color: var(--monodeck-dark-muted);
}

/* コメント送信ボタン。透明背景に白枠・白文字のアウトライン型とする。 */
html[data-monodeck-theme="dark"] .comment-respond .form-submit .submit {
  color: var(--monodeck-dark-heading);
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--monodeck-dark-heading);
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
}

html[data-monodeck-theme="dark"] .comment-respond .form-submit .submit:hover {
  color: var(--monodeck-dark-heading);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--monodeck-dark-heading);
}

html[data-monodeck-theme="dark"] .comment-respond .form-submit .submit:active {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--monodeck-dark-heading);
}

html[data-monodeck-theme="dark"] .comment-respond .form-submit .submit:focus-visible {
  outline: 2px solid var(--monodeck-dark-link);
  outline-offset: 3px;
}

/* 記事本文のCTAボタン。Pochipp等のブランドボタンは対象外。 */
html[data-monodeck-theme="dark"] .c-postContent .ark-block-button.is-btn-fill .ark-block-button__link,
html[data-monodeck-theme="dark"] .c-postContent .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):not([style*="background"]) {
  color: var(--monodeck-dark-bg);
  font-weight: 700;
  background: var(--monodeck-dark-emphasis);
  border-color: var(--monodeck-dark-emphasis);
  box-shadow: none;
}

html[data-monodeck-theme="dark"] .c-postContent .ark-block-button.is-btn-fill .ark-block-button__link:hover,
html[data-monodeck-theme="dark"] .c-postContent .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):not([style*="background"]):hover {
  color: var(--monodeck-dark-bg);
  background: #f5b892;
  border-color: #f5b892;
}

html[data-monodeck-theme="dark"] .c-postContent .ark-block-button.is-btn-outline .ark-block-button__link,
html[data-monodeck-theme="dark"] .c-postContent .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
  color: var(--monodeck-dark-emphasis);
  background: transparent;
  border-color: var(--monodeck-dark-emphasis);
}

html[data-monodeck-theme="dark"] .c-postContent .ark-block-button .ark-block-button__link:focus-visible,
html[data-monodeck-theme="dark"] .c-postContent .wp-block-button .wp-block-button__link:focus-visible {
  outline: 2px solid var(--monodeck-dark-link);
  outline-offset: 3px;
}

/* Arkhe Blocksのブログカード。 */
html[data-monodeck-theme="dark"] .arkb-boxLink {
  color: var(--monodeck-dark-text);
  background-color: var(--monodeck-dark-surface);
  border-color: var(--monodeck-dark-border);
  box-shadow: 0 0 0 1px var(--monodeck-dark-border), 0 8px 24px rgba(0, 0, 0, 0.18);
}

html[data-monodeck-theme="dark"] .arkb-boxLink__inner {
  color: var(--monodeck-dark-text);
  background-color: transparent;
}

html[data-monodeck-theme="dark"] .arkb-boxLink__title,
html[data-monodeck-theme="dark"] .arkb-boxLink__more {
  color: var(--monodeck-dark-heading);
}

/* 通常太字とArkhe Blocksの装飾太字は、周囲の文字色を変えず太さだけを揃える。 */
html[data-monodeck-theme="dark"] .c-postContent strong,
html[data-monodeck-theme="dark"] .c-postContent b,
html[data-monodeck-theme="dark"] .c-postContent .arkb-format-bold {
  color: inherit;
  font-weight: 700;
}

/* Pochipp本体。販売先ボタンのブランド色は変更しない。 */
html[data-monodeck-theme="dark"] .pochipp-box {
  color: var(--monodeck-dark-text);
  background: var(--monodeck-dark-surface);
  box-shadow: 0 0 0 1px var(--monodeck-dark-border), 0 10px 28px rgba(0, 0, 0, 0.22);
}

html[data-monodeck-theme="dark"] .pochipp-box__title,
html[data-monodeck-theme="dark"] .pochipp-box__title a,
html[data-monodeck-theme="dark"] .pochipp-box__price,
html[data-monodeck-theme="dark"] .pochipp-box__info {
  color: var(--monodeck-dark-text) !important;
}

/* 記事固有のMac比較ツール。ライト用の固定色だけをダーク時に置き換える。 */
html[data-monodeck-theme="dark"] .mac-compare {
  color: var(--monodeck-dark-text);
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-btn {
  color: var(--monodeck-dark-text) !important;
  background: var(--monodeck-dark-surface) !important;
  border-color: #5c6066 !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-btn:hover {
  border-color: #a8adb3 !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-size,
html[data-monodeck-theme="dark"] .mac-compare .mc-table thead th,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody th,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody td,
html[data-monodeck-theme="dark"] .mac-compare .mc-selector-menu li {
  color: var(--monodeck-dark-text) !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-name,
html[data-monodeck-theme="dark"] .mac-compare .mc-head-price,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody tr.mc-section-row td {
  color: var(--monodeck-dark-muted) !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-icon svg {
  fill: var(--monodeck-dark-muted);
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-menu {
  background: var(--monodeck-dark-surface);
  border-color: #5c6066;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-menu li:hover,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-selector-menu li.mc-active {
  color: var(--monodeck-dark-link) !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-table thead th,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody th,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody td,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody tr,
html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody tr.mc-section-row td {
  border-color: var(--monodeck-dark-table-border) !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-table tbody td.mc-na {
  color: #72767d !important;
}

html[data-monodeck-theme="dark"] .mac-compare .mc-color-dot {
  border-color: rgba(255, 255, 255, 0.22);
}

/* 記事内目次。 */
html[data-monodeck-theme="dark"] body.single-post .c-postContent .monodeck-content-toc__toggle {
  color: var(--monodeck-dark-text);
  border-color: #666a70;
}

html[data-monodeck-theme="dark"] body.single-post .c-postContent .monodeck-content-toc__toggle:hover {
  border-color: #a8adb3;
  background: rgba(255, 255, 255, 0.06);
}

html[data-monodeck-theme="dark"] body.single-post .c-postContent .monodeck-content-toc__toggle:focus-visible {
  outline-color: var(--monodeck-dark-heading);
}

/* 既存のフローティング目次・TOPボタン。 */
html[data-monodeck-theme="dark"] .arkhe-fix-btn {
  color: var(--monodeck-dark-text);
  background: rgba(36, 38, 41, 0.94);
  border-color: #666a70;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

html[data-monodeck-theme="dark"] .arkhe-fix-btn__icon,
html[data-monodeck-theme="dark"] .arkhe-fix-btn__label {
  color: var(--monodeck-dark-text);
}

html[data-monodeck-theme="dark"] .arkhe-toc-modal__content {
  color: var(--monodeck-dark-text);
  background: var(--monodeck-dark-surface);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

html[data-monodeck-theme="dark"] .arkhe-toc-modal__header {
  border-color: var(--monodeck-dark-border);
}

html[data-monodeck-theme="dark"] .arkhe-toc-modal__title,
html[data-monodeck-theme="dark"] .arkhe-toc-modal__body .arkhe-toc-modal__toc a,
html[data-monodeck-theme="dark"] .arkhe-toc-modal__body .arkhe-toc-modal__toc a::before {
  color: var(--monodeck-dark-text);
}

html[data-monodeck-theme="dark"] .arkhe-toc-modal__body .arkhe-toc-modal__toc ol ol a::before,
html[data-monodeck-theme="dark"] .arkhe-toc-modal__body .arkhe-toc-modal__toc ul ul a::before,
html[data-monodeck-theme="dark"] .arkhe-toc-modal__close {
  color: var(--monodeck-dark-muted);
}

html[data-monodeck-theme="dark"] .arkhe-toc-modal__close:hover {
  color: var(--monodeck-dark-heading);
  background: rgba(255, 255, 255, 0.07);
}

html[data-monodeck-theme="dark"] .arkhe-toc-modal__body::-webkit-scrollbar-track {
  background: var(--monodeck-dark-bg-deep);
}

html[data-monodeck-theme="dark"] .arkhe-toc-modal__body::-webkit-scrollbar-thumb {
  background: #55595f;
}

/* 記事固有のiPhoneバッテリー容量表。メタCSSの固定色を暗色時だけ上書きする。 */
html[data-monodeck-theme="dark"] .ib-battery {
  color: var(--monodeck-dark-text);
}

html[data-monodeck-theme="dark"] .ib-table-wrap::after {
  background: linear-gradient(transparent, var(--monodeck-dark-bg));
}

html[data-monodeck-theme="dark"] .ib-table th,
html[data-monodeck-theme="dark"] .ib-table td {
  color: var(--monodeck-dark-text);
  border-bottom-color: var(--monodeck-dark-table-border) !important;
}

html[data-monodeck-theme="dark"] .ib-table thead th {
  color: var(--monodeck-dark-muted);
  border-bottom-color: var(--monodeck-dark-table-border) !important;
}

html[data-monodeck-theme="dark"] .ib-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

html[data-monodeck-theme="dark"] .ib-toggle-btn {
  color: var(--monodeck-dark-link);
  border-color: var(--monodeck-dark-link);
}

html[data-monodeck-theme="dark"] .ib-toggle-btn:hover {
  color: var(--monodeck-dark-bg);
  background: var(--monodeck-dark-link);
}

/* 記事固有のiPadバッテリー容量表。 */
html[data-monodeck-theme="dark"] .ipb-battery {
  color: var(--monodeck-dark-text);
}

html[data-monodeck-theme="dark"] .ipb-table-wrap::after {
  background: linear-gradient(transparent, var(--monodeck-dark-bg));
}

html[data-monodeck-theme="dark"] .ipb-table th,
html[data-monodeck-theme="dark"] .ipb-table td {
  color: var(--monodeck-dark-text);
  border-bottom-color: var(--monodeck-dark-table-border) !important;
}

html[data-monodeck-theme="dark"] .ipb-table thead th {
  color: var(--monodeck-dark-heading);
  border-bottom-color: var(--monodeck-dark-table-border) !important;
}

html[data-monodeck-theme="dark"] .ipb-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

html[data-monodeck-theme="dark"] .ipb-toggle-btn {
  color: var(--monodeck-dark-link);
  border-color: var(--monodeck-dark-link);
}

html[data-monodeck-theme="dark"] .ipb-toggle-btn:hover {
  color: var(--monodeck-dark-bg);
  background: var(--monodeck-dark-link);
}

/* ローカル試作用の3状態切替。将来はヘッダー内へ統合する想定。 */
.monodeck-theme-switcher {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  color: #2b2d30;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.monodeck-theme-switcher[hidden] {
  display: none !important;
}

.monodeck-theme-switcher__label {
  padding: 0 7px 0 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  opacity: 0.68;
}

.monodeck-theme-switcher__button {
  min-width: 42px;
  min-height: 36px;
  padding: 7px 10px;
  color: inherit;
  font-family: var(--monodeck-font-sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.monodeck-theme-switcher__button:hover {
  background: rgba(17, 17, 17, 0.06);
}

.monodeck-theme-switcher__button[aria-pressed="true"] {
  color: #fff;
  background: #202124;
}

.monodeck-theme-switcher__button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

html[data-monodeck-theme="dark"] .monodeck-theme-switcher {
  color: var(--monodeck-dark-text);
  background: rgba(31, 33, 36, 0.9);
  border-color: var(--monodeck-dark-border);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.36);
}

html[data-monodeck-theme="dark"] .monodeck-theme-switcher__button:hover {
  background: rgba(255, 255, 255, 0.07);
}

html[data-monodeck-theme="dark"] .monodeck-theme-switcher__button[aria-pressed="true"] {
  color: #1c1d1f;
  background: #f2f3f4;
}

html.monodeck-theme-ready body,
html.monodeck-theme-ready .l-header,
html.monodeck-theme-ready .l-footer,
html.monodeck-theme-ready .monodeck-theme-switcher {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

html.monodeck-theme-ready .l-header {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    transform 0.22s ease, opacity 0.18s linear;
}

@media (max-width: 599px) {
  .monodeck-theme-switcher {
    left: 10px;
    bottom: 10px;
  }

  .monodeck-theme-switcher__label {
    display: none;
  }

  .monodeck-theme-switcher__button {
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
  }
}

@media print {
  .monodeck-page-curtain,
  .monodeck-theme-switcher {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.monodeck-theme-ready body,
  html.monodeck-theme-ready .l-header,
  html.monodeck-theme-ready .l-footer,
  html.monodeck-theme-ready .monodeck-theme-switcher {
    transition: none;
  }
}

/* トップ最上部のヘッダー透過（子テーマfront-top.cssのA演出のダーク側例外） */
html[data-monodeck-theme="dark"] .home .l-header:not(.monodeck-scrolled) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
