@charset "utf-8";
/* =========================================================
   AI攻略WEB CSS Ver.0.1
   theme.css
   色はここだけ触れば全体を変えられる
   ========================================================= */

:root {
  color-scheme: light;

  --color-page: #ffffff;
  --color-panel: #f7f8fa;
  --color-panel-subtle: #eef1f4;
  --color-text: #22262b;
  --color-heading: #12161b;
  --color-muted: #66707a;
  --color-link: #58646B;
  --color-link-hover: #005EFF;
  --color-link-active: #C00020;
  --color-menu-dim: #99A3AE;
  --color-accent: #0b63ce;
  --color-focus: #ffb000;
  --color-border: #d9dee5;
  --color-border-strong: #adb6c1;
  --color-code-inline: #edf1f5;
  --color-code-block: #f7f8fa;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --color-page: #333333;
  --color-panel: #191d22;
  --color-panel-subtle: #22272e;
  --color-text: #DDDDDD;
  --color-heading: #ffffff;
  --color-muted: #aab2bd;
  --color-link: #B8C4CA;
  --color-link-hover: #279BFF;
  --color-link-active: #FF304B;
  --color-menu-dim: #7F8994;
  --color-accent: #69aefc;
  --color-focus: #ffd166;
  --color-border: #303741;
  --color-border-strong: #596473;
  --color-code-inline: #20262d;
  --color-code-block: #171b20;
}



/* =========================================================
   AI攻略WEB Ver.0.34
   Chrome Sage theme
   ChromeのSageテーマを基準
   ========================================================= */
:root {
  --sage-light: #D9E6D4; /* RGB 217, 230, 212 */
  --sage-mid:   #BDCAB9; /* RGB 189, 202, 185 */
  --sage-deep:  #89968F; /* RGB 137, 150, 143 */
  --sage-dark:  #556254; /* RGB  85,  98,  84 */
}

:root[data-theme="sage"] {
  color-scheme: light;

  --color-page: var(--sage-light);
  --color-panel: var(--sage-light);
  --color-panel-subtle: var(--sage-mid);
  --color-text: #000000;
  --color-heading: var(--sage-dark);
  --color-muted: var(--sage-dark);
  --color-link: var(--sage-dark);
  --color-link-hover: #0069E6;
  --color-link-active: #B80024;
  --color-menu-dim: var(--sage-dark);
  --color-accent: var(--sage-deep);
  --color-focus: var(--sage-dark);
  --color-border: var(--sage-mid);
  --color-border-strong: var(--sage-deep);
  --color-code-inline: var(--sage-mid);
  --color-code-block: var(--sage-light);
}

/* H2の形はSageを手本に全テーマ共通。テーマ側は色変数のみ。 */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    --color-page: #333333;
    --color-panel: #191d22;
    --color-panel-subtle: #22272e;
    --color-text: #DDDDDD;
    --color-heading: #ffffff;
    --color-muted: #aab2bd;
    --color-link: #B8C4CA;
    --color-link-hover: #279BFF;
    --color-link-active: #FF304B;
    --color-menu-dim: #7F8994;
    --color-accent: #69aefc;
    --color-focus: #ffd166;
    --color-border: #303741;
    --color-border-strong: #596473;
    --color-code-inline: #20262d;
    --color-code-block: #171b20;
  }
}


/* =========================================================
   AI攻略WEB CSS Ver.0.1
   base.css
   文章・見出し・画像・引用・表・記事情報などの共通部品
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font-family: "Segoe UI", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--color-link-hover); }
a:active { color: var(--color-link-active); }

/* V58: 2段階スイッチ Hover 1px / Active 3px */
a:hover { position: relative; left: 1px; top: 1px; }
a:active { position: relative; left: 3px; top: 3px; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

img,
video,
iframe { max-width: 100%; }
img { height: auto; }

figure { margin: 2rem 0; }
figcaption {
  margin-top: 0.5rem;
}

/* TMS・写真説明・注釈：同一の文字スタイル */
.tms,
figcaption {
  color: var(--color-muted);
  font-size: 14px;
}

h1, h2, h3, h4 {
  color: var(--color-heading);
  line-height: 1.35;
  text-wrap: pretty;
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

h2 {
  margin: 3.6rem 0 1.2rem;
  padding: 0.65rem 0.8rem;
  border-left: 6px solid var(--color-heading);
  border-top: 1px solid var(--color-border);
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font-size: clamp(1.74rem, 2.4vw, 2.4rem);
  scroll-margin-top: 5rem;
}

h3 {
  margin: 2.6rem 0 0.9rem;
  font-size: 1.3em;
  scroll-margin-top: 5rem;
}

/* V52: 会話の名前ラベル。H2と同じ装飾、文字はH2より小さめ */
.article-body .name-label {
  margin: 3.6rem 0 1.2rem;
  padding: 0.65rem 0.8rem;
  border-left: 6px solid var(--color-heading);
  border-top: 1px solid var(--color-border);
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font-size: clamp(1.5rem, 2.1vw, 2.1rem);
  font-weight: 700;
  line-height: 1.35;
}

/* V51: H4は本文の1.3倍、通常ウェイト */
.article-body h4 {
  font-size: 1.3em;
  font-weight: 400;
  margin: 1.15rem 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
}

p { margin: 1.15rem 0; }
ul, ol { margin: 1.1rem 0; padding-left: 1.6rem; }
li + li { margin-top: 0.35rem; }

hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

blockquote {
  margin: 2rem 0;
  padding: 0.7rem 1.2rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-panel-subtle);
}

blockquote > :first-child { margin-top: 0; }
blockquote > :last-child { margin-bottom: 0; }

code, kbd, samp { font-family: "Cascadia Code", "Consolas", monospace; }
code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--color-code-inline);
}
pre {
  margin: 1.8rem 0;
  padding: 1rem 1.2rem;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-code-block);
  line-height: 1.65;
}
pre code { padding: 0; background: transparent; }

.tms {
  margin: 0 0 2.4rem;
}

/* 読みやすい行長。画像・表・preなどは制限しない。 */
.article-body > p,
.article-body > ul,
.article-body > ol,
.article-body > blockquote { max-width: var(--reading-width); }

/* DQ10ジャンプフェスタ式「間」 */
.space-xs { height: 1rem; }
.space-sm { height: 2rem; }
.space-md { height: 4rem; }
.space-lg { height: 7rem; }
.space-xl { height: 12rem; }
.space-xxl { height: 20rem; }

.article-data {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-panel);
}
.article-data dt { color: var(--color-muted); font-weight: 700; }
.article-data dd { margin: 0; }

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
}
.data-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  background: var(--color-panel);
}
.data-table th,
.data-table td {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.data-table th { background: var(--color-panel-subtle); }

.next-article {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--color-border);
  font-weight: 700;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================
 * AI攻略WEB Ver.0.3
 *  記事本文の文字サイズ S / M / L 独立ボタン切り替え
 * V76
 *  本文 S=14px / M=18px / L=22px
 *  表   S=12px / M=15px / L=18px
 *   表を使用する際にCSSを実装する。
 *   ヘッダーの本文S/M/Lボタンと連動させる。
 *   表のみ文字を小さくして横幅を節約する。
   ========================================== */

:root {
  --article-font-size: 16px;
}

:root[data-font-size="s"] {
  --article-font-size: 14px;
}

:root[data-font-size="m"] {
  --article-font-size: 18px;
}

:root[data-font-size="l"] {
  --article-font-size: 22px;
}

.article-body {
  font-size: var(--article-font-size);
}

/* 本文の強調文字：標準本文16pxを基準とした固定倍率 */
.article-body .x2  { font-size: 32px; }
.article-body .x3  { font-size: 48px; }
.article-body .x5  { font-size: 80px; }
.article-body .x10 { font-size: 160px; }


/* =========================================================
   AI攻略WEB CSS Ver.0.1
   layout.css
   PC用3カラム / 左メニュー / 本文 / 右目次
   ========================================================= */

:root {
  --site-max-width: 1680px;
  --left-width: 180px;
  --right-width: 220px;
  --column-gap: 24px;
  --header-height: 58px;
  --page-padding-x: 24px;
  --reading-width: 78ch;}

/* PCでも使用する左メニュー開閉ボタン */
.mobile-menu-button {
  position: fixed;
  z-index: 350;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-panel);
  color: var(--color-text);
  cursor: pointer;}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-page) 92%, transparent);
  backdrop-filter: blur(10px);}

.header-inner {
  width: min(100%, var(--site-max-width));
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--page-padding-x) 0 56px;
  display: flex;
  align-items: center;
  gap: 0.8rem;}

.site-title {
  margin-right: auto;
  color: var(--color-heading);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;}

.site-logo {
  display: block;
  max-width: 100%;
  height: auto;
}
/*.site-logo { display: block; width: auto; height: 48px; max-width: 100%; }*/

.header-button {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-panel);
  color: var(--color-text);
  cursor: pointer;}
.header-button:hover { background: var(--color-panel-subtle); }

.site-shell {
  width: min(100%, var(--site-max-width));
  margin: 0 auto;
  padding: 0 24px 0 8px;}

.page-grid {
  display: grid;
  grid-template-columns: minmax(140px, var(--left-width)) minmax(0, 1fr) minmax(180px, var(--right-width));
  gap: var(--column-gap);
  align-items: start;}

.left-sidebar {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(var(--header-height) + 12px);
  max-height: calc(100dvh - var(--header-height) - 24px);
  min-width: 140px;
  max-width: 360px;
  overflow: visible;
  padding: 0;
  border-right: 3px solid var(--color-border);
  }

.sidebar-title {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  font-weight: 800;}

.sidebar-nav details { border-bottom: 1px solid var(--color-border); }
.sidebar-nav summary {
  position: relative;
  padding: 4px 20px 4px 3px;
  line-height: 140%;
  cursor: pointer;
  color: var(--color-heading);
  font-weight: 400;
  list-style: none;
  user-select: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
  }
.sidebar-nav summary::-webkit-details-marker { display: none; }
.sidebar-nav summary::after {
  content: "\25BC";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-heading);
  font-size: 1.2rem;
  font-weight: 400;}
.sidebar-nav details[open] > summary::after { content: "\25B2"; }
.sidebar-nav ul { margin: 0 0 4px; padding: 0 0 0 8px; list-style: none; }
.sidebar-nav li + li { margin-top: 0; }
.sidebar-nav a {
  display: block;
  padding: 2px 2px;
  line-height: 140%;
  border-radius: 5px;
  color: var(--color-text);
  text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;  
  }
/* V43: 左メニューのみ、訪問済みを＋／－と同じ薄い色にする */
.sidebar-nav a:visited { color: var(--color-menu-dim); }
.sidebar-nav a:hover {
  color: var(--color-link-hover);
  background-color: var(--color-panel-subtle);
}
.sidebar-nav a:active { color: var(--color-link-active); }

.sidebar-resizer,
.right-sidebar-resizer {
  position: absolute;
  z-index: 20;
  top: 0;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  touch-action: none;}

.sidebar-resizer { right: -5px; }
.right-sidebar-resizer { left: -5px; }

.article-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 34px 0 72px;}
.article-card { min-width: 0; }

.right-sidebar {
  grid-column: 3;
  grid-row: 1;
  position: sticky;
  top: calc(var(--header-height) + 18px);
  max-height: calc(100dvh - var(--header-height) - 30px);
  min-width: 180px;
  max-width: 320px;
  overflow: visible;
  padding: 0;
  border-left: 3px solid var(--color-border);
  }

.toc-title {
  margin: 0 0 0.7rem;
  color: var(--color-heading);
  font-size: 0.95rem;
  font-weight: 800;}
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc li + li { margin-top: 0.22rem; }
.toc a {
  display: block;
  padding: 0.25rem 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-decoration: none;}
.toc a:hover { color: var(--color-link-hover); }
.toc a:active { color: var(--color-link-active); }

/* =========================================================
   AI攻略WEB V41：リンク先頭の11px透過GIF
   赤□＝サイト内 / 青□＝ページ内 / 赤矢印＝外部
   ========================================================= */

/* 左メニューと記事内のサイト内リンク */
.sidebar-nav a,
.article-body a.link-internal {
  padding-left: 12px;
  background-image: url("../img/0redfree.gif");
  background-repeat: no-repeat;
  background-position: left 5px;
  background-size: 11px 11px;
}

/* PC右目次、狭い画面の目次、記事内のページ内リンク */
.toc a,
.mobile-toc a,
.article-body a.link-toc {
  padding-left: 12px;
  background-image: url("../img/0bluefree.gif");
  background-repeat: no-repeat;
  background-position: left 8px;
  background-size: 11px 11px;
}

/* 記事本文の外部リンク（赤矢印11px） */
.article-body a.link-external {
  padding-left: 14px;
  background-image: url("../img/0linkredfree.gif");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 11px 11px;
}

/* スマホ目次は番号と青□を二重表示しない */
.mobile-toc ol {
  list-style: none;
  padding-left: 0;
}

/* V59: 実広告160×600。広告コードそのものには手を加えない */
.ad-rail {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  height: 600px;
  min-height: 600px;
  max-height: 600px;
  margin: 0 0 1.8rem;
}



body.layout-wide .page-grid {
  grid-template-columns: minmax(140px, var(--left-width)) minmax(0, 1fr);}
body.layout-wide .right-sidebar { display: none; }

body.layout-full .page-grid { display: block; }
body.layout-full .left-sidebar,
body.layout-full .right-sidebar { display: none; }

body.left-collapsed .page-grid {
  grid-template-columns: 0 minmax(0, 1fr) minmax(180px, var(--right-width));}
body.left-collapsed .left-sidebar {
  width: 0;
  
  overflow: hidden;
  border: 0;
  opacity: 0;
  pointer-events: none;}

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-panel);}
.footer-inner {
  width: min(100%, var(--site-max-width));
  margin: 0 auto;
  padding: 8px var(--page-padding-x);
  color: var(--color-text);
  font-size: 0.88rem;
  text-align: center;
}
.footer-inner p {
  margin: 0;
  line-height: 1.5;
}

/* =========================================================
   AI攻略WEB Ver.0.3
   右メニュー開閉 / ユーティリティボタン
   ========================================================= */

/* 右メニューOFF */
body.right-collapsed .page-grid {
  grid-template-columns:
    minmax(140px, var(--left-width))
    minmax(0, 1fr);}

body.right-collapsed .right-sidebar {
  display: none;}

/* 左右ともOFF */
body.left-collapsed.right-collapsed .page-grid {
  grid-template-columns: minmax(0, 1fr);}

body.left-collapsed.right-collapsed .article-main {
  grid-column: 1;
}

body.left-collapsed.right-collapsed .left-sidebar {
  display: none;
}

/* 上部の小型操作ボタン */
.utility-button {
  min-width: 38px;
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-panel);
  color: var(--color-text);
  cursor: pointer;
  font-weight: 400;}

.utility-button:hover {
  background: var(--color-panel-subtle);}

.more-button {
  min-width: 38px;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0;}


/* ドラッグ位置を少しだけ視認しやすくする */
.sidebar-resizer::after,
.right-sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: transparent;
  transition: background 120ms ease;}

.sidebar-resizer:hover::after,
.right-sidebar-resizer:hover::after,
body.is-resizing .sidebar-resizer::after,
body.is-resizing .right-sidebar-resizer::after {
  background: var(--color-border-strong);}

body.is-resizing {
  user-select: none;
  cursor: ew-resize;}

/* =========================================================
   AI攻略WEB Ver.0.12
   V04ベース：左右メニュー文字サイズ
   SS / S / M を独立ボタン化
   SS=12px / S=14px / M=16px
   ========================================================= */

.sidebar-heading-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 6px;}

.sidebar-heading-row .sidebar-title {
  margin: 0;}

.sidebar-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;}

.right-font-controls {
  margin: 0 0 0.8rem;}

.sidebar-font-controls button {
  min-width: 28px;
  min-height: 25px;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-panel);
  color: var(--color-text);
  cursor: pointer;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1;}

.sidebar-font-controls button:hover {
  background: var(--color-panel-subtle);}

.sidebar-font-controls button[aria-pressed="true"] {
  border-color: var(--color-border-strong);
  background: var(--color-panel-subtle);
  box-shadow: inset 0 0 0 1px var(--color-border-strong);}

/* ---------- 左メニュー ---------- */

/* SS = 11px */
.left-sidebar.font-ss .sidebar-title,
.left-sidebar.font-ss .sidebar-nav summary,
.left-sidebar.font-ss .sidebar-nav a {
  font-size: 11px !important;}

/* S = 13px */
.left-sidebar.font-s .sidebar-title,
.left-sidebar.font-s .sidebar-nav summary,
.left-sidebar.font-s .sidebar-nav a {
  font-size: 13px !important;}

/* M = 16px */
.left-sidebar.font-m .sidebar-title,
.left-sidebar.font-m .sidebar-nav summary,
.left-sidebar.font-m .sidebar-nav a {
  font-size: 16px !important;}

/* ---------- 右メニュー ---------- */

/* SS = 11px */
.right-sidebar.font-ss .toc-title,
.right-sidebar.font-ss .toc a,
.right-sidebar.font-ss .ad-rail {
  font-size: 11px !important;}

/* S = 13px */
.right-sidebar.font-s .toc-title,
.right-sidebar.font-s .toc a,
.right-sidebar.font-s .ad-rail {
  font-size: 13px !important;}

/* M = 16px */
.right-sidebar.font-m .toc-title,
.right-sidebar.font-m .toc a,
.right-sidebar.font-m .ad-rail {
  font-size: 16px !important;}

/* =========================================================
   AI攻略WEB Ver.0.13
   左サイドバー内部スクロール
   ========================================================= */

.left-sidebar-scroll {
  max-height: calc(100dvh - var(--header-height) - 24px);
  overflow-y: auto;
  padding: 12px 6px 16px 0;
  scrollbar-width: thin;}

/* =========================================================
   AI攻略WEB Ver.0.15
   本文 S / M / L を独立ボタン化
   サイズボタンはすべて通常ウェイト
   ========================================================= */

.article-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;}

.article-font-controls button {
  min-width: 28px;
  min-height: 28px;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-panel);
  color: var(--color-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;}

.article-font-controls button:hover {
  background: var(--color-panel-subtle);}

.article-font-controls button[aria-pressed="true"] {
  border-color: var(--color-border-strong);
  background: var(--color-panel-subtle);
  box-shadow: inset 0 0 0 1px var(--color-border-strong);}

/* =========================================================
   AI攻略WEB Ver.0.17
   右サイドバー：
   本文 ｜ 3px境界線 ｜ 縦スクロール ｜ 右メニュー内容
   ========================================================= */

/* 右サイドバー内部だけをスクロール */
.right-sidebar-scroll {
  max-height: calc(100dvh - var(--header-height) - 30px);
  overflow-y: auto;
  padding: 18px 0 28px 10px;
  scrollbar-width: thin;

  /* スクロールバーを左側へ移動 */
  direction: rtl;}

/* 本文・目次の文字方向は通常に戻す */
.right-sidebar-scroll > * {
  direction: ltr;}

/* PC・スマホ共通：記事内の折りたたみ目次 */
.mobile-toc {
  display: block;
  margin: 1rem 0 2.4rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-panel);
}

.mobile-toc summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.mobile-toc summary::-webkit-details-marker {
  display: none;
}

.mobile-toc summary::before {
  content: "\25BC";
  margin-right: 8px;
  font-size: 1.2rem;
}

.mobile-toc[open] summary::before {
  content: "\25B2";
}

/* 閉じているとき：マウスオンで青 */
.mobile-toc:not([open]) summary:hover {
  color: #005EFF;
}

/* クリック中：赤 */
.mobile-toc summary:active {
  color: #C00020;
}

/* 開いている間：赤のまま */
.mobile-toc[open] summary {
  color: #C00020;
}

/* =========================================================
   AI攻略WEB CSS Ver.0.22
   responsive.css
   PC → 中間幅 → スマホ
   ========================================================= */

@media (max-width: 849px) {
  .page-grid {
    grid-template-columns: minmax(140px, var(--left-width)) minmax(0, 1fr);
  }

  .right-sidebar { display: none; }

    [data-right-toggle] {
    display: none;
  }

body.left-collapsed .page-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.left-collapsed .article-main {
  grid-column: 1;
}

body.left-collapsed .left-sidebar {
  display: none;
}

}

/* V73 PC・スマホ共通：ページトップボタン */
.back-to-top {
  display: grid;
  place-items: center;
  position: fixed;
  right: 16px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 400;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-panel);
  color: var(--color-heading);
  font-size: 31px;
  font-weight: 634;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}

@media (max-width: 820px) {
  :root { --page-padding-x: 16px; }
	
	  /* V73 スマホ本文 S / M / L */
  :root[data-font-size="s"] { --article-font-size: 14px; }
  :root[data-font-size="m"] { --article-font-size: 19px; }
  :root[data-font-size="l"] { --article-font-size: 24px; }

  body { line-height: 1.85; }
  .header-inner { padding-left: 56px; }
  .page-grid { display: block; }

  .left-sidebar {
    position: fixed;
    z-index: 300;
    top: 0;
    left: 0;
    width: min(86vw, 330px);
    height: 100dvh;
    max-height: none;
    padding: 0;
    border-right: 5px solid var(--color-border);
    background: var(--color-page);
    overflow: visible;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 12px 0 34px rgb(0 0 0 / 0.18);
  }

  .left-sidebar-scroll {
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 18px 16px 30px;
  }

  body.nav-open .left-sidebar { transform: translateX(0); }

  .sidebar-resizer {
  display: none;
  }
  

  .article-main { padding-top: 24px; }

  .nav-overlay {
    position: fixed;
    z-index: 250;
    inset: 0;
    display: none;
    background: rgb(0 0 0 / 0.38);
  }

  body.nav-open .nav-overlay { display: block; }

  .article-data {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .article-data dd + dt { margin-top: 0.7rem; }

    h2 {
    margin-top: 3rem;
    font-size: 24px;
  }

  .space-lg { height: 5rem; }
  .space-xl { height: 8rem; }
  .space-xxl { height: 12rem; }

  
  

  body.left-collapsed .left-sidebar {
    display: block;
    width: min(86vw, 330px);
    padding: 0;
    border-right: 5px solid var(--color-border);
    opacity: 1;
    pointer-events: auto;
  }

}

@media (max-width: 480px) {
  :root { --page-padding-x: 12px; }
  body { font-size: 15px; }
  .article-main { padding-bottom: 52px; }
  .data-table { min-width: 32rem; }

  [data-theme-toggle] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
    V59: ChatGPT風会話表示 / テーマ別の吹き出し色
    ========================================================= */
:root {
  --chat-user-bg: #e7f2ff;
  --chat-user-text: #172b42;
  --chat-gpt-bg: #f2f3f5;
}
:root[data-theme="dark"] {
  --chat-user-bg: #1d4177;
  --chat-user-text: #ffffff;
  --chat-gpt-bg: #404040;
}
:root[data-theme="sage"] {
  --chat-user-bg: #e7f2ff;
  --chat-user-text: #172b42;
  --chat-gpt-bg: #e5eee1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --chat-user-bg: #1d4177;
    --chat-user-text: #ffffff;
    --chat-gpt-bg: #404040;
  }
}
.article-body .chat-user {
  width: fit-content;
  max-width: 80%;
  margin: 1.15rem 0 1.15rem auto;
  padding: 12px 16px;
  border-radius: 11px;
  background: var(--chat-user-bg);
  color: var(--chat-user-text);
  overflow-wrap: anywhere;
}

.article-body .chat-gpt {
  width: fit-content;
  max-width: 100%;
  margin: 1.15rem 0;
  padding: 12px 16px;
  border-radius: 11px;
  background: var(--chat-gpt-bg);
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.article-body .chat-user > :first-child,
.article-body .chat-gpt > :first-child { margin-top: 0; }
.article-body .chat-user > :last-child,
.article-body .chat-gpt > :last-child { margin-bottom: 0; }

@media (max-width: 480px) {
  .article-body .chat-user { max-width: 90%; padding: 10px 14px; }
}

/* V64 右サイドバー開閉アイコン */
.more-button svg {
  display: block;
  width: 24px;
  height: 24px;
}


/* =========================================================
   V65 Paper Theme: 9 GIF paper textures + SPACE
   Files live at /img/ (CSS-relative paths work in /test/ and root).
   V64 layout, resizing, font controls and AdSense are unchanged.
   ========================================================= */
:root {
  --paper-image: url("../img/white_paper.gif");
}

/* All light paper variants share the readable light palette. */
:root[data-theme="white-paper"] { --paper-image: url("../img/white_paper.gif"); }
:root[data-theme="dq8-cream"] { --paper-image: url("../img/dq8_cream.gif"); }
:root[data-theme="dq9-sky"] { --paper-image: url("../img/dq9_sky.gif"); }
:root[data-theme="dq10-cream"] { --paper-image: url("../img/dq10_cream.gif"); }
:root[data-theme="dq-rose"] { --paper-image: url("../img/dq_rose.gif"); }

/* Dark family: reuse the proven V64 dark palette. */
:root:is([data-theme="dark-grey"], [data-theme="dark-green"],
         [data-theme="dark-indigo"], [data-theme="dark-black"],
         [data-theme="space"]) {
  color-scheme: dark;
  --color-page: #333333;
  --color-panel: #191d22;
  --color-panel-subtle: #22272e;
  --color-text: #DDDDDD;
  --color-heading: #ffffff;
  --color-muted: #aab2bd;
  --color-link: #B8C4CA;
  --color-link-hover: #279BFF;
  --color-link-active: #FF304B;
  --color-menu-dim: #a1aab5;
  --color-accent: #69aefc;
  --color-focus: #ffd166;
  --color-border: #303741;
  --color-border-strong: #596473;
  --color-code-inline: #20262d;
  --color-code-block: #171b20;
  --chat-user-bg: #1d4177;
  --chat-user-text: #ffffff;
  --chat-gpt-bg: #404040;
}
:root[data-theme="dark-grey"]   { --paper-image: url("../img/dark_grey.gif"); }
:root[data-theme="dark-green"]  { --paper-image: url("../img/dark_green.gif"); }
:root[data-theme="dark-indigo"] { --paper-image: url("../img/dark_indigo.gif"); }
:root[data-theme="dark-black"]  { --paper-image: url("../img/dark_black.gif"); }
:root[data-theme="space"] {
  --paper-image: none;
  --color-page: #101418;
}

/* Paper is the actual page surface, including the mobile drawer. */
body {
  background-color: var(--color-page);
  background-image: var(--paper-image);
  background-repeat: repeat;
}
@media (max-width: 820px) {
  .left-sidebar {
    background-color: var(--color-page);
    background-image: var(--paper-image);
    background-repeat: repeat;
  }
}

/* V65 ヘッダー・フッターにもPaper Themeを適用 */
.site-header,
.site-footer {
  background-color: var(--color-page);
  background-image: var(--paper-image);
  background-repeat: repeat;
}

/* V74：前後の奮闘記ナビゲーション */
.article-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2em;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
/* V74：前後記事リンク 1.1倍＋赤□ */
.article-nav a {
  font-size: 1.1em;
  padding-left: 16px;
  background-image: url("../img/0redfree.gif");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 11px 11px;
}

/* V75：TMS 日時表示（テーマ連動） */
.article-body .tms-box {
  display: table;
  margin: 1rem 0;
  padding: 3px 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: 5px;
  color: var(--color-muted);
  font-size: 14px;
}

/* V75：GPT回答の見出し */
.article-body .chat-gpt .gpt-label {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

/* V76：Adsense広告レスポンシブ対応 */
/* デフォルト（PC表示）の設定 */
.ads-pc {
  display: block;
}
/* PCではスマホ用を隠す */
.ads-sp {
  display: none;
}

/* スマホなど画面幅が狭い場合（例: 768px未満）の切り替え */
@media screen and (max-width: 768px) {
  .ads-pc {
    display: none; /* スマホではPC用（728x90）を隠す */
  }
  .ads-sp {
    display: block; /* スマホ用を表示する */
    text-align: center; /* 必要に応じて中央寄せ */
  }
}

/* =========================================================
   V78: Ai奮闘記 GPTパートへの「つづきを読む」
   GPT吹き出し背景を継承。JavaScript不要。
   ========================================================= */
.article-body .gpt-preview {
  position: relative;
  max-height: var(--preview-height, 12em);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
}
.article-body .gpt-preview > :first-child { margin-top: 0; }
.article-body .gpt-preview > :last-child { margin-bottom: 0; }
.article-body .gpt-read-more {
  margin: 0.8rem 0 0;
  text-align: center;
}
.article-body .gpt-read-more a {
  display: inline-block;
  padding: 7px 24px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-panel-subtle);
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.article-body .gpt-read-more a:hover {
  background: var(--color-panel);
  color: var(--color-link-hover);
}
.article-body .gpt-read-more a:active { color: var(--color-link-active); }
