/*
  きゅーそくせんこぅ｜Boilerplate用の追加デザインCSS
  Responsive: yes

  Boilerplateを適用したブログで「デザインCSS」のテーマ・背景のシステム記述の後ろに貼る。
  以前貼ったこのデザインのCSSがあれば、このファイルの内容に差し替える。
  ナビ・自己紹介・顔カードのHTMLと、生成目次などの既存JSは引き続き使う。
  サブタイトルの文言はブログ設定の「ブログの説明」で変更する。

  目次
    00–03  Boilerplateの配色補正・共通設定・カラム・ヘッダー
    04–07  記事カード・本文・表・生成目次
    08–11  サイドバー・アーカイブ・フッター・画面幅とモーション
    12–13  ブログ専用パーツ・個別記事用の表
    14–16  スマホの余白・3カラムの幅・最新記事と注目記事

  同じ要素への後勝ちの指定があるため、各ルールの掲載順に注意。
  カラム幅の追加指定は15、最新記事と注目記事の追加指定は16を参照。
*/

/* ────────────────────────────────────────────────────────────────────
   00 Boilerplateの既定色をテーマの配色に合わせる
   ──────────────────────────────────────────────────────────────────── */
mark {
  background-color: var(--marker);
  color: var(--ink);
}
html,
body {
  color: var(--ink);
  background-color: var(--surface);
}
a { color: var(--link); }
a:hover { color: var(--navy-deep); }
a.keyword {
  border-bottom: 1px dotted var(--border);
  color: var(--ink);
}
h1, h2, h3, h4, h5, h6 { color: var(--ink); }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: var(--ink); }
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { color: var(--navy-deep); }
#globalheader-container {
  background-color: var(--navy);
  color: var(--on-navy);
}
#title a { color: var(--ink); }
.entry-header { border-bottom: 1px solid var(--border); }
.date a { color: var(--muted); }
.entry-content table th,
.entry-content table td { border: 1px solid var(--border); }
.entry-content table th { background: var(--surface-sub); }
.entry-content blockquote { border: 1px solid var(--border); }
.entry-content pre { background: var(--surface-sub); }
.entry-content code { background-color: var(--surface-sub); }
.entry-content hr { border-top: 1px solid var(--border); }
.entry-content .table-of-contents { border: 1px solid var(--border); }
.entry-footer-section { color: var(--muted); }
.entry-footer-section a { color: var(--muted); }
.comment-box .entry-comment { border-bottom: 1px solid var(--border); }
.comment-box .entry-comment:first-child { border-top: 1px solid var(--border); }
.comment-content { color: var(--ink); }
.comment-metadata { color: var(--muted); }
.comment-metadata a { color: var(--muted); }
.leave-comment-title { border: 1px solid var(--border); }
.hatena-module-title { border-bottom: 1px solid var(--border); }
.hatena-module-title a { color: var(--ink); }
.hatena-urllist .urllist-date-link a { color: var(--muted); }
.hatena-module-search-box .search-form { border: 1px solid var(--border); }
.hatena-module-search-box .search-module-input { color: var(--ink); }
.page-about .entry-content dt { border-bottom: 1px solid var(--border); }
#footer { color: var(--muted); }
#footer a { color: var(--muted); }

/* ────────────────────────────────────────────────────────────────────
   01 配色・書体・アクセシビリティ
   ──────────────────────────────────────────────────────────────────── */
/*
  基本色はテーマの後ろに置いたブログ側の :root から上書きできる。
  派生色は基本色に追従する。個別に調整するときは同じ変数を直接指定する。
*/
:root {
  --bg: #EDF0F5;          /* ページ背景と海グラデーションの基準 */
  --surface: #FFFFFF;     /* 記事カード・入力欄などの面 */
  --ink: #1E2340;         /* 本文と通常の文字 */
  --muted: #555B73;       /* 日付・補足・サイドバーの副文 */
  --navy: #283055;        /* ヘッダー・見出し帯・ボタン */
  --navy-deep: #0F1633;   /* フッター・影・濃いホバー色 */
  --teal: #64E0E8;        /* 波線・罫線・選択色 */
  --teal-pale: #E3F8FA;   /* 結論帯・カテゴリ・目次の選択面 */
  --link: #0B7380;        /* リンク・フォーカス・案内の文字 */
  --orange: #FBA171;      /* タイトル横の三角・背景の差し色 */
  --orange-dark: #B5470F; /* 注意書きの文字・濃いオレンジの基準 */
  --marker: #FFD3B8;      /* 本文のマーカー・注意表示の罫線 */
  --border: #DDE1EA;      /* 枠線・区切り線 */

  /* 濃色パネルの文字。既定で白いカード面と同じ色を使う。 */
  --on-navy: var(--surface);
  --on-navy-muted: #B9BED6;

  /* 背景グラデーションの4色。--bg に追従し、個別指定も可能。 */
  --sea-top: rgb(from var(--bg) calc(r - 17) calc(g - 5) calc(b - 3));
  --sea-upper: rgb(from var(--bg) calc(r - 36) calc(g - 20) calc(b - 9));
  --sea-lower: rgb(from var(--bg) calc(r - 63) calc(g - 42) calc(b - 23));
  --sea-bottom: rgb(from var(--bg) calc(r - 94) calc(g - 71) calc(b - 44));

  /* 淡いカード面、サイドバー、カテゴリのホバー色。 */
  --surface-sub: rgb(from var(--surface) calc(r - 10) calc(g - 8) calc(b - 5));
  --side-card-bg: rgb(from var(--bg) calc(r - 5) calc(g - 2) calc(b - 5));
  --teal-hover: rgb(from var(--teal-pale) calc(r - 22) calc(g - 10) calc(b - 9));

  /* 共通の三角はSVGの形だけを使い、色は各部品が指定する。 */
  --naval-triangle-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpolygon points='5,3 22,13 5,23' fill='none' stroke='%23000' stroke-width='2.6' stroke-linejoin='round'/%3E%3Cline x1='11.5' y1='8' x2='11.5' y2='18' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");

  --layout-width: 1480px;
  --article-width: 840px;
  --naval-mono: "IBM Plex Mono", Consolas, "SFMono-Regular", monospace;
  --radius-card: 12px;
  --radius-box: 8px;
  --shadow: 0 1px 3px color-mix(in srgb, var(--navy-deep) 7%, transparent);
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
}

/* ページ背景・文字組み */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  scrollbar-color: var(--navy) var(--bg);
}
*, *::before, *::after { box-sizing: inherit; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 12% -6%, color-mix(in srgb, var(--teal) 38%, transparent), transparent 62%),
    radial-gradient(900px 620px at 96% 12%, color-mix(in srgb, var(--navy) 30%, transparent), transparent 60%),
    radial-gradient(760px 560px at 78% 88%, color-mix(in srgb, var(--orange) 14%, transparent), transparent 60%),
    radial-gradient(900px 700px at 4% 96%, color-mix(in srgb, var(--teal) 20%, transparent), transparent 62%),
    linear-gradient(168deg, var(--sea-top) 0%, var(--sea-upper) 34%, var(--sea-lower) 68%, var(--sea-bottom) 100%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.8;
}
a { color: var(--link); }
a:hover { color: var(--navy-deep); }

/* 選択色・フォーカス・スクロールバー */
::selection {
  background: var(--teal);
  color: var(--navy-deep);
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--navy);
  border-radius: 5px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover { background: var(--navy-deep); }

/* ────────────────────────────────────────────────────────────────────
   02 ページ幅とカラム
   ──────────────────────────────────────────────────────────────────── */

/* 共通レイアウト。3カラム時の幅調整は15を参照。 */
#container {
  width: auto;
  margin: 0;
  padding: 0;
}
#content-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: var(--layout-width);
  margin: 28px auto 0;
  padding: 0 20px;
}
#wrapper, #box2 {
  width: 100%;
  max-width: 760px;
  min-width: 0;
}
#blog-title, #top-box, .global-nav, #footer {
  padding-inline: max(20px, calc((100% - var(--layout-width)) / 2 + 20px));
}
@media (min-width: 1241px) {
  #content-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }
  #wrapper {
    flex: 0 1 var(--article-width);
    max-width: none;
  }
  #box2 {
    flex: 0 0 300px;
    align-self: stretch;
  }
  #box2-inner { height: 100%; }
  #box2 > .hatena-module:last-child,
  #box2-inner > .hatena-module:last-child {
    position: sticky;
    top: 20px;
  }
}
@media (max-width: 860px) {
  #content-inner { padding-inline: 14px; }
}

/* ────────────────────────────────────────────────────────────────────
   03 ヘッダーとナビゲーション
   ──────────────────────────────────────────────────────────────────── */
#blog-title {
  position: relative;
  background: var(--navy);
  color: var(--on-navy);
  margin: 0;
  padding-block: 28px 24px;
  text-align: left;
}
#title {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin: 0;
}
#title a {
  color: var(--on-navy);
  text-decoration: none;
}
#blog-description { margin: 6px 0 0; }
#top-editarea { margin: 0; }

#title a::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 26px;
  margin-left: 10px;
  vertical-align: -4px;
  background-color: var(--orange);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpolygon points='5,3 22,13 5,23' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cline x1='11.5' y1='8' x2='11.5' y2='18' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
#blog-description {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--on-navy-muted);
  margin-top: 6px;
}
#blog-description::before {
  content: "";
  display: block;
  width: 110px;
  height: 8px;
  margin-bottom: 8px;
  background-color: var(--teal);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 8'%3E%3Cpath d='M1%204%20Q%2010%200.5,%2019%204%20T%2037%204%20T%2055%204%20T%2073%204%20T%2091%204%20T%20109%204%20T%20127%204%20T%20145%204' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* グローバルナビゲーション */
.global-nav {
  background: var(--surface);
  border-top: 3px solid var(--teal);
  border-bottom: 1px solid var(--border);
}
body.page-entry .global-nav,
body.page-about .global-nav { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.global-nav ul {
  list-style: none;
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  flex-wrap: wrap;
}
.global-nav a {
  display: block;
  padding: 10px 14px;
  min-height: 2.75rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.global-nav a:hover {
  color: var(--link);
  border-bottom-color: var(--teal-pale);
}
.global-nav a.is-current {
  color: var(--link);
  border-bottom-color: var(--teal);
}

/* ────────────────────────────────────────────────────────────────────
   04 記事カードと記事ヘッダー
   ──────────────────────────────────────────────────────────────────── */
.entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 36px 40px 40px;
  margin-bottom: 28px;
}
.entry-header {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 0;
}
.entry-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 6px;
}
.entry-title a { color: var(--ink); }
.date {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.date a { color: var(--muted); }
.categories {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.categories a {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--link);
  background: var(--teal-pale);
  border-radius: 999px;
  padding: 2px 12px;
  text-decoration: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  transition: background-color 0.15s var(--ease);
}
.categories a:hover {
  background: var(--teal-hover);
  color: var(--link);
}

/* 本文の余白・リンク・強調・画像 */
.entry-content {
  margin-top: 24px;
  counter-reset: kou-h2;
}
.entry-content p { margin: 0 0 20px; }
.entry-content a {
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.entry-content a:hover { text-decoration-color: var(--link); }
.entry-content em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--marker) 62%);
  padding: 0 2px;
}
.entry-content img { border-radius: var(--radius-box); }

/* 記事ヘッダー内の並びと生成メタ情報 */
.entry-header .entry-categories {
  order: 1;
  margin: 0 0 10px;
}
.entry-header .entry-title { order: 2; }
.kou-entry-meta {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.kou-entry-author {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--ink);
}
.kou-entry-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}
/* 日付入りのメタ情報が生成されたときだけ標準の日付を隠す。 */
.entry-header:has(.kou-entry-meta time) > .date { display: none; }

/* 記事タグ */
.entry-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 3px 12px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}
.entry-tags a:hover {
  color: var(--link);
  border-color: var(--teal);
}

/* ────────────────────────────────────────────────────────────────────
   05 本文・見出し・標準目次
   ──────────────────────────────────────────────────────────────────── */
.entry-content h2 {
  position: relative;
  counter-increment: kou-h2;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  background: var(--navy);
  color: var(--on-navy);
  border-radius: var(--radius-box);
  padding: 10px 16px 10px 24px;
  margin: 40px 0 20px;
  scroll-margin-top: 20px;
}
/* 縦棒は帯の内側に置き、折り返しても1行目の中央に揃える。 */
.entry-content h2::after {
  content: "";
  position: absolute;
  inset-inline-start: 7px;
  inset-block-start: calc(10px + 0.75em - 13px);
  width: 4px;
  height: 26px;
  border-radius: 2px;
  background: var(--teal);
  pointer-events: none;
}
.entry-content h2 a { color: var(--on-navy); }
.entry-content h3 {
  position: relative;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--navy);
  border-bottom: 1px solid transparent;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--teal) 40%, transparent),
    color-mix(in srgb, var(--border) 45%, var(--surface))
  )
    left bottom / 100% 1px no-repeat border-box;
  padding: 2px 0 8px 12px;
  margin: 32px 0 16px;
  scroll-margin-top: 20px;
}
.entry-content h3::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(2px + 0.75em - 9px);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--teal);
  pointer-events: none;
}
.entry-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 24px 0 12px;
  scroll-margin-top: 20px;
}
.entry-content h4::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: var(--teal);
  margin-right: 5px;
  vertical-align: middle;
}
.entry-content h5, .entry-content h6 { color: var(--navy); }
.entry-content h2::before {
  content: counter(kou-h2, decimal-leading-zero);
  position: relative;
  inset-inline-start: -6px;
  font-family: var(--naval-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.1em;
  margin-right: 8px;
}

/* 本文のリスト記号。目次と入れ子の箇条書きには既定の表示を使う。 */
.entry-content ul:not(.table-of-contents, :is(ul, ol, .table-of-contents, .kou-toc) ul) > li::marker {
  content: "▷ ";
  color: var(--orange-dark);
  font-size: 0.85em;
}
.entry-content ol:not(.table-of-contents, :is(.table-of-contents, .kou-toc) ol) > li::marker {
  color: var(--orange-dark);
}

/* 引用・コード・標準目次 */
.entry-content blockquote {
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  background: var(--surface-sub);
  padding: 20px;
}
.entry-content pre {
  background: var(--surface-sub);
  border-radius: var(--radius-box);
}
.entry-content code { background: var(--surface-sub); }
.entry-content .table-of-contents {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 16px 12px 32px;
  margin: 20px 0;
}

/* 記事フッター・ページ送り */
.entry-footer { margin-top: 28px; }
.pager a { color: var(--link); }

/* ────────────────────────────────────────────────────────────────────
   06 表と任意の本文パーツ
   ──────────────────────────────────────────────────────────────────── */
.entry-content table {
  border: 1px solid var(--border);
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14.5px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}
.entry-content table th, .entry-content table td {
  border: none;
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.entry-content table thead th {
  background: var(--navy);
  color: var(--on-navy);
  font-weight: 700;
  font-size: 13.5px;
  border-top: none;
  border-bottom: 2px solid var(--teal);
}
.entry-content table tbody tr:nth-child(even) { background: var(--surface-sub); }
.entry-content table tbody tr { transition: background-color 0.12s var(--ease); }
.entry-content table tbody tr:hover { background: var(--teal-pale); }
.entry-content table tbody th {
  background: var(--surface-sub);
  color: var(--navy);
  font-weight: 700;
}
/* JSで作る横スクロール枠。枠がない表はBoilerplateの横スクロールを使う。 */
.kou-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  overflow-x: auto;
  margin: 24px 0 8px;
}
.kou-table-wrap table {
  display: table;
  margin: 0;
  border: none;
  width: 100%;
}

/* 結論・注意書き・表の見出しと合計セル */
.entry-content .kou-result {
  background: var(--teal-pale);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 22px 0;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.7;
}
.entry-content .kou-note {
  color: var(--orange-dark);
  font-size: 13.5px;
}
.entry-content .data-table-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 26px 0 10px;
}
.entry-content .data-table-title::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background-color: var(--orange-dark);
  mask: var(--naval-triangle-mask) center / contain no-repeat;
}
.entry-content table td.total {
  font-weight: 700;
  color: var(--navy);
}

/* 区切りの深度は、区切り要素のある記事で段落に応じて進む装飾値。 */
.entry-content:has(.kou-divider) { counter-reset: kou-h2 kou-depth; }
.entry-content:has(.kou-divider) p { counter-increment: kou-depth 3; }
.entry-content:has(.kou-divider) p:nth-of-type(3n+1) { counter-increment: kou-depth 1; }
.entry-content:has(.kou-divider) p:nth-of-type(3n+2) { counter-increment: kou-depth 2; }
.entry-content:has(.kou-divider) p:nth-of-type(3n) { counter-increment: kou-depth 3; }
.kou-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 36px 0 4px;
  opacity: .82;
}
.kou-divider .rule, .kou-divider::after {
  flex: 1;
  height: 8px;
  background-image: repeating-linear-gradient(to right, var(--border) 0 1px, transparent 1px 16px);
  background-size: 100% 6px;
  background-repeat: no-repeat;
  background-position: bottom left;
  border-bottom: 1px solid var(--border);
}
.kou-divider::after { content: ""; }
.kou-divider svg {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--orange-dark);
}
.kou-divider svg [stroke]:not([stroke="none"]):not([stroke="transparent"]) { stroke: currentColor; }
.kou-divider svg [fill]:not([fill="none"]):not([fill="transparent"]) { fill: currentColor; }
.kou-divider .d-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}
.kou-divider .d-label::before { content: "DEPTH \2014  " counter(kou-depth) " m"; }

/* ────────────────────────────────────────────────────────────────────
   07 生成目次（従来の .kou-* HTML／JS に対応）
   ──────────────────────────────────────────────────────────────────── */
#kou-toc-col { display: none; }
@media (min-width: 1241px) {
  #kou-toc-col {
    display: block;
    flex: 0 0 228px;
    align-self: stretch;
  }
}
.kou-toc {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 14px 14px 10px;
  scrollbar-width: thin;
}
.kou-toc-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.kou-toc-title::before {
  content: "";
  width: 4px;
  height: 14px;
  background: var(--teal);
  border-radius: 2px;
  flex: none;
}
.kou-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kou-toc a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.45;
  min-height: 1.75rem;
  border-radius: 6px;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.kou-toc a .tri {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 2px;
  opacity: 0.4;
  background-color: var(--orange-dark);
  mask: var(--naval-triangle-mask) center / contain no-repeat;
  transition: opacity 0.15s var(--ease);
}
.kou-toc a:hover {
  color: var(--link);
  background: var(--surface-sub);
}
.kou-toc a:hover .tri { opacity: 1; }
.kou-toc a.is-active {
  color: var(--link);
  background: var(--teal-pale);
  font-weight: 700;
}
.kou-toc a.is-active .tri { opacity: 1; }
.kou-toc li.toc-sub a {
  padding: 3px 8px 3px 30px;
  font-size: 13px;
  min-height: 1.6rem;
  color: var(--muted);
}
.kou-toc li.toc-sub a:hover, .kou-toc li.toc-sub a.is-active { color: var(--link); }
.kou-toc li.toc-sub a .tri {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpolygon points='5,3 22,13 5,23' fill='none' stroke='%23000' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 記事内に置く生成目次 */
.kou-toc--inline {
  position: static;
  max-height: none;
  overflow: visible;
  background: var(--surface-sub);
  box-shadow: none;
  margin-top: 20px;
}
/* 生成目次がある記事でだけ標準の目次を省略する。 */
.entry:has(.kou-toc--inline) .entry-content .table-of-contents { display: none; }
@media (min-width: 1241px) {
  body:has(#kou-toc-col .kou-toc) .kou-toc--inline { display: none; }
}

/* ────────────────────────────────────────────────────────────────────
   08 サイドバーと検索
   ──────────────────────────────────────────────────────────────────── */
#box2 .hatena-module {
  background: var(--side-card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--navy-deep) 4%, transparent);
  padding: 20px;
  margin-bottom: 16px;
  font-size: 14px;
}
#box2 .hatena-module-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#box2 .hatena-module-title::before {
  content: "";
  width: 4px;
  height: 15px;
  background: var(--teal);
  border-radius: 2px;
  flex: none;
}
#box2 .hatena-module-title a { color: var(--navy); }
/* プロフィール */
.hatena-module-profile .profile-icon { border-radius: var(--radius-box); }
.hatena-module-profile .id { font-size: 17px; }
.hatena-module-profile .profile-description {
  font-size: 14px;
  line-height: 1.85;
}
/* リスト系モジュール */
#box2 .hatena-urllist li { padding: 10px 2px; }
#box2 .hatena-urllist li + li { border-top: 1px solid var(--border); }
#box2 .hatena-urllist .urllist-date-link a {
  font-size: 12px;
  color: var(--muted);
}
#box2 .hatena-urllist .urllist-title-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
#box2 .hatena-urllist li a:hover .urllist-title-link { color: var(--link); }
/* カテゴリーモジュール */
#box2 .hatena-module-category ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#box2 .hatena-module-category .hatena-urllist li { padding: 0; }
#box2 .hatena-module-category li + li {
  margin-top: 0;
  border-top: 1px solid var(--border);
}
#box2 .hatena-module-category li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
#box2 .hatena-module-category li a:hover { color: var(--link); }

/* 検索フォーム */
.hatena-module-search-box .search-form {
  display: flex;
  gap: 8px;
  border: none;
  background: transparent;
  border-radius: 0;
}
.hatena-module-search-box .search-module-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  min-height: 2.5rem;
  height: auto;
  padding: 6px 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.hatena-module-search-box :is(.search-module-input, .search-module-button):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
#box2 .hatena-module-search-box .search-module-button {
  width: auto;
  height: auto;
  min-height: 2.5rem;
  padding: 0 16px;
  margin-right: 0;
  background: var(--navy);
  color: var(--on-navy);
  border: none;
  border-radius: var(--radius-box);
  font-size: 13.5px;
  font-weight: 700;
  opacity: 1;
  cursor: pointer;
}
#box2 .hatena-module-search-box .search-module-button:hover {
  background: var(--navy-deep);
  opacity: 1;
}

/* カテゴリ件数 */
.kou-cat-count {
  font-family: var(--naval-mono);
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-sub);
  border-radius: 999px;
  padding: 0 10px;
}

/* 最新記事。カードの追加指定は16を参照。 */
.hatena-module-recent-entries .urllist-item-inner {
  display: flex;
  flex-direction: column;
}
.hatena-module-recent-entries .urllist-item-inner time { order: -1; }
.hatena-module-recent-entries .urllist-item-inner > a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.55;
}
.hatena-module-recent-entries .urllist-item-inner > a:hover { color: var(--link); }
.hatena-module-recent-entries .urllist-item-inner.has-thumb {
  display: grid;
  grid-template-columns: 76px 1fr;
  column-gap: 12px;
  grid-template-areas: "img date" "img title";
  align-items: start;
}
.hatena-module-recent-entries .urllist-item-inner.has-thumb .kou-thumb {
  grid-area: img;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-box);
}
.hatena-module-recent-entries .urllist-item-inner.has-thumb time { grid-area: date; }
.hatena-module-recent-entries .urllist-item-inner.has-thumb > a { grid-area: title; }
/* 注目記事：はてなが出すサムネイルを左に置き、日付→タイトル→カテゴリの並びに整える（現行ブログの並び） */
.hatena-module-entries-access-ranking li { overflow: hidden; }
.hatena-module-entries-access-ranking li img {
  float: left;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-box);
  margin: 2px 12px 6px 0;
}
.hatena-module-entries-access-ranking .urllist-date-link {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.hatena-module-entries-access-ranking .urllist-title-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
}
.hatena-module-entries-access-ranking .urllist-category-link {
  display: inline-block;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 999px;
  padding: 0 8px;
  margin-top: 4px;
}

/* サムネイル共通の表示と最新記事の日付 */
.hatena-module-recent-entries .kou-thumb,
.hatena-module-entries-access-ranking li img,
.hatena-module-related-entries li img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.hatena-module-related-entries li img { border-radius: var(--radius-box); }
.hatena-module-recent-entries .kou-post-date {
  order: -1;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.hatena-module-recent-entries .urllist-item-inner.has-thumb .kou-post-date { grid-area: date; }

/* ────────────────────────────────────────────────────────────────────
   09 アーカイブ
   ──────────────────────────────────────────────────────────────────── */
.page-archive .archive-entries {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 861px) {
  .page-archive .archive-entries { grid-template-columns: 1fr 1fr; }
}
.page-archive .archive-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  position: relative;
  padding: 16px;
  margin: 0;
  line-height: 1.6;
}
.page-archive .entry-thumb {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-box);
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
  float: none;
}
.page-archive .entry-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.55;
  margin: 4px 0 6px;
}
.page-archive .entry-title a {
  color: var(--ink);
  text-decoration: none;
}
.page-archive .entry-title a:hover { color: var(--link); }
.page-archive .archive-entry-header {
  font-size: 12.5px;
  color: var(--muted);
}
.page-archive .entry-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-archive .social-buttons { display: none; }
.page-archive .categories { margin-top: 8px; }
.archive-header-category { color: var(--navy); }
/* 記事カード全体をタイトルのリンクにする。カテゴリとタグは個別に操作できる。 */
.page-archive .archive-entry .entry-title-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-card);
}
.page-archive .archive-entry :is(.archive-category-link, .archive-entry-tag-link) {
  position: relative;
  z-index: 2;
}
.page-archive .archive-entry .entry-title-link:hover::after {
  box-shadow: inset 0 0 0 1px var(--link);
}
.page-archive .archive-entry .entry-title-link:focus-visible::after {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}


/* ────────────────────────────────────────────────────────────────────
   10 フッター・ページ先頭へ戻るボタン・新着表示
   ──────────────────────────────────────────────────────────────────── */
#footer {
  background: var(--navy-deep);
  color: var(--on-navy-muted);
  width: auto;
  margin: 8px 0 0;
  padding-block: 24px 28px;
  font-size: 13px;
  text-align: center;
}
#footer a { color: var(--on-navy-muted); }

/* ページ先頭へ戻るボタン */
#kou-pagetop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  text-decoration: none;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--navy-deep) 25%, transparent);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
#kou-pagetop::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2.5px solid var(--on-navy);
  border-left: 2.5px solid var(--on-navy);
  transform: rotate(45deg) translate(1px, 1px);
}
#kou-pagetop.is-show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 861px) { #kou-pagetop { display: flex; } }

/* 新着ラベル */
.kou-new {
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  color: var(--orange-dark);
  margin-left: 6px;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────────────────────────
   11 狭い画面とモーション設定
   ──────────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  #blog-title { padding-block: 20px 18px; }
  #title { font-size: 22px; }
  .entry { padding: 24px 20px 28px; }
  .entry-title { font-size: 22px; }
  .global-nav ul { padding: 0 6px; }
  .global-nav a {
    padding: 8px 10px;
    font-size: 14px;
  }
  .entry-content table { font-size: 13px; }
  .entry-content table th, .entry-content table td { padding: 7px 8px; }
  .entry-content h2 { font-size: 18px; }
  .entry-content h3 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .global-nav a, .kou-toc a, .kou-toc a .tri,
  #kou-pagetop, .entry-content table tbody tr, .categories a { transition: none; }
}

/* ────────────────────────────────────────────────────────────────────
   12 ブログ専用の追加CSS
   ──────────────────────────────────────────────────────────────────── */
/*
  きゅーそくせんこぅ専用の追加CSS
  配色を変更する場合の上書き例と、ブログ専用のパーツ。
*/

/*
  配色を変更する場合は次の :root ブロックのコメントを外す。
  変更したい項目だけ記述すれば、他はテーマの既定色を使う。

:root {
  --bg: #F5F7F9;
  --surface: #FFFFFF;
  --ink: #293244;
  --muted: #526078;
  --navy: #283055;
  --navy-deep: #0F1633;
  --teal: #64E0E8;
  --teal-pale: #E9FAFB;
  --link: #176C78;
  --orange: #FBA171;
  --orange-dark: #B34712;
  --marker: #FCE2D2;
  --border: #DEE5EB;
}

  濃色の帯に載る文字も調整する場合は --on-navy、--on-navy-muted を追加。
  海グラデーションを個別指定する場合は --sea-top、--sea-upper、
  --sea-lower、--sea-bottom を追加。
*/

/* ヘッダーの顔画像とブログの肩書き */
#blog-title::after {
  content: "";
  position: absolute;
  right: max(20px, calc((100% - var(--layout-width)) / 2 + 20px));
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 2px solid var(--teal);
  background: url("https://cdn-ak.f.st-hatena.com/images/fotolife/K/Kou_scone/20261120/20261120163349.png") center / cover no-repeat;
}
/* 顔画像の右端にタイトルが重ならないようにする。 */
#blog-title-content { padding-inline-end: 80px; }
@media (max-width: 860px) {
  #blog-title::after {
    right: 16px;
    width: 52px;
    height: 52px;
  }
  #blog-title-content { padding-inline-end: 64px; }
}
#blog-title-content::before {
  content: "WORLD OF WARSHIPS GUIDE";
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--teal);
  margin-bottom: 8px;
}

/* 一覧の自己紹介・Twitch・リンクカード */
.kou-hero { display: none; }
body.page-index .kou-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: var(--layout-width);
  margin: 20px auto 0;
  padding-inline: 20px;
}
.kou-hero .tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}
.kou-hero .tile-intro {
  grid-column: span 2;
  grid-row: span 2;
}
.kou-hero .tile-twitch {
  grid-column: span 2;
  background: var(--navy);
  color: var(--on-navy);
  border-color: var(--navy);
}
.kou-hero .tile-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.kou-hero .tile-text {
  font-size: 13.5px;
  line-height: 1.75;
  margin-top: 8px;
  color: var(--muted);
}
.kou-hero .tile-twitch .tile-text { color: var(--on-navy-muted); }
.kou-hero .tile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.kou-hero .fact-chip {
  font-size: 12px;
  font-weight: 500;
  color: var(--link);
  background: var(--teal-pale);
  border-radius: 999px;
  padding: 1px 10px;
}
.kou-hero .tile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.kou-hero .tile-link .tile-name { font-size: 16px; }
.kou-hero .tile-twitch .tile-link { color: var(--on-navy); }
.kou-hero .tile-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: normal;
}
.kou-hero .tile-twitch .tile-sub { color: var(--on-navy-muted); }
@media (max-width: 860px) {
  body.page-index .kou-hero {
    grid-template-columns: repeat(2, 1fr);
    padding-inline: 14px;
  }
  .kou-hero .tile-intro { grid-column: span 2; }
  .kou-hero .tile-twitch { grid-column: span 2; }
}

/* サイドバーの顔カードとプロフィール項目 */
.kou-face-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kou-face-name .tri {
  width: 13px;
  height: 13px;
  flex: none;
  background-color: var(--orange-dark);
  mask: var(--naval-triangle-mask) center / contain no-repeat;
}
.kou-face-role {
  display: inline-block;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--link);
  background: var(--teal-pale);
  border-radius: 999px;
  padding: 2px 12px;
}
.kou-facts {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.kou-facts .fact b {
  display: block;
  font-family: var(--naval-mono);
  font-weight: 600;
  font-size: 17px;
  color: var(--navy);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.kou-facts .fact span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  display: block;
}
.kou-face-text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
}
.kou-face-ign {
  font-family: var(--naval-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
/* 顔カードと同じプロフィールモジュール内にある小アイコンだけを省略する。 */
.hatena-module-profile:has(.kou-face-name) .profile-icon { display: none; }

/* サイドバーのリンク集 */
.kou-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kou-links .link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-sub) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--navy-deep) 6%, transparent), 0 4px 10px color-mix(in srgb, var(--navy-deep) 4.5%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--surface) 95%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--navy-deep) 3%, transparent);
  text-decoration: none;
  color: var(--ink);
  min-height: 3rem;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.kou-links .link-item:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
  transform: translateY(-1px);
  color: var(--ink);
}
.kou-links .link-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-box);
  flex: none;
  background: var(--navy);
  color: var(--on-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--navy-deep) 22%, transparent), inset 0 1px 0 color-mix(in srgb, var(--surface) 18%, transparent);
}
.kou-links .link-main {
  flex: 1;
  min-width: 0;
}
.kou-links .link-name {
  display: block;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.4;
}
.kou-links .link-sub {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.kou-links .live-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--orange-dark);
  background: var(--surface);
  border: 1px solid var(--marker);
  border-radius: 999px;
  padding: 2px 10px;
}
.kou-links .live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-dark);
}

.kou-links .link-icon svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  .kou-links .link-item { transition: none; }
  .kou-links .link-item:hover { transform: none; }
}

/* ────────────────────────────────────────────────────────────────────
   13 個別記事用の表
   ──────────────────────────────────────────────────────────────────── */
/*
  個別記事用の見本

  添付元の本文スタイルは共通テーマに収録。以下は特殊な表だけを調整する例。
  対象の表を <div class="coal-commanders">…</div> で囲み、
  数値セルに class="is-number"、必要な横スクロール枠に
  class="kou-table-wrap" を付ける。

  デザインCSS欄で使う場合も、記事固有のクラスがある箇所にだけ適用される。
  別の記事に流用する場合は coal-commanders を記事固有の名前に変更する。

  テーマが用意する本文クラス
    .kou-result       結論や要点
    .kou-note         注意書き
    .data-table-title 表の見出し
    td.total          合計セル
*/

.entry-content .coal-commanders .kou-table-wrap table { min-width: 34rem; }

.entry-content .coal-commanders table .is-number {
  text-align: right;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────────────────────────
   14 スマホの記事レイアウト（760px以下）
   ──────────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  body:is(.page-entry, .page-index) #content-inner {
    padding-inline: 0;
  }

  body:is(.page-entry, .page-index) #wrapper > #main > #main-inner {
    padding-inline: 0;
  }

  body:is(.page-entry, .page-index) #box2 {
    width: calc(100% - 28px);
  }

  body:is(.page-entry, .page-index) #main-inner > .pager {
    margin-inline: 14px;
  }

  body:is(.page-entry, .page-index) #main-inner .entry {
    margin-inline: 0;
    padding-inline: 16px;
    border-inline: 0;
  }

  :is(.page-entry, .page-index) .entry-content > figure:has(img) {
    margin-inline: 0;
  }

  /* 本文と同じ幅の枠を使い、内側の横余白を詰める。 */
  :is(.page-entry, .page-index) .entry-content > :is(blockquote, pre, .kou-result),
  :is(.page-entry, .page-index) .entry > .kou-toc--inline {
    margin-inline: 0;
    padding-inline: 12px;
  }

  :is(.page-entry, .page-index) .entry-content > .table-of-contents {
    padding-inline: 24px 12px;
  }

  :is(.page-entry, .page-index) .entry-content > pre {
    overflow-x: auto;
  }

  :is(.page-entry, .page-index) .entry-content > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  :is(.page-entry, .page-index) .entry-content table :is(th, td) {
    padding-inline: 6px;
  }

  :is(.page-entry, .page-index) .entry-content :is(figure, p) img {
    max-width: 100%;
    height: auto;
  }
}

/* ────────────────────────────────────────────────────────────────────
   15 記事ページの3カラム幅（1241px以上）
   ──────────────────────────────────────────────────────────────────── */
/* 左右のカラムがそろう記事ページの3カラム表示。 */
@media (min-width: 1241px) {
  #content-inner:has(> #kou-toc-col):has(> #box2) {
    column-gap: 14px;
  }

  #content-inner:has(> #box2) > #kou-toc-col {
    flex-basis: 236px;
  }

  #content-inner:has(> #kou-toc-col) > #box2 {
    flex-basis: 320px;
  }
}

/* ────────────────────────────────────────────────────────────────────
   16 最新記事・注目記事のカード
   ──────────────────────────────────────────────────────────────────── */
/* 08の基本スタイルに重ねて、最新記事と注目記事の行をそろえる。 */
#box2 :is(.hatena-module-recent-entries, .hatena-module-entries-access-ranking) .hatena-urllist {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#box2 :is(.hatena-module-recent-entries, .hatena-module-entries-access-ranking) .hatena-urllist > li {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 10px 12px;
  min-height: 3rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-sub) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--navy-deep) 6%, transparent), 0 4px 10px color-mix(in srgb, var(--navy-deep) 4.5%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--surface) 95%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--navy-deep) 3%, transparent);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

/* カード内のグリッド */
#box2 :is(.hatena-module-recent-entries, .hatena-module-entries-access-ranking) .urllist-item-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 3px;
  align-content: start;
  align-items: start;
}

#box2 .hatena-module-recent-entries .urllist-item-inner.has-thumb,
#box2 .hatena-module-entries-access-ranking .urllist-item-inner:has(> .urllist-image-link) {
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "image date" "image title" "image categories";
  column-gap: 10px;
}

/* サムネイル */
#box2 .hatena-module-recent-entries .urllist-item-inner.has-thumb > .kou-thumb,
#box2 .hatena-module-entries-access-ranking .urllist-item-inner > .urllist-image-link {
  grid-area: image;
}

#box2 .hatena-module-entries-access-ranking .urllist-image-link > img {
  display: block;
  float: none;
  margin: 0;
}

#box2 .hatena-module-recent-entries .urllist-item-inner.has-thumb > .kou-thumb,
#box2 .hatena-module-entries-access-ranking .urllist-image-link > img {
  width: 64px;
  height: 64px;
}

/* 日付・タイトル・カテゴリー */
#box2 .hatena-module-recent-entries .urllist-item-inner:has(> .kou-post-date) > time {
  display: none;
}

#box2 .hatena-module-recent-entries .urllist-item-inner.has-thumb > :is(.kou-post-date, time),
#box2 .hatena-module-entries-access-ranking .urllist-item-inner:has(> .urllist-image-link) > .urllist-date-link {
  grid-area: date;
}

#box2 .hatena-module-recent-entries .urllist-item-inner.has-thumb > a,
#box2 .hatena-module-entries-access-ranking .urllist-item-inner:has(> .urllist-image-link) > .urllist-title-link {
  grid-area: title;
}

#box2 .hatena-module-recent-entries .urllist-item-inner > a,
#box2 .hatena-module-entries-access-ranking .urllist-title-link {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#box2 .hatena-module-entries-access-ranking .urllist-item-inner:has(> .urllist-image-link) > .urllist-categories {
  grid-area: categories;
}

#box2 .hatena-module-entries-access-ranking .urllist-date-link,
#box2 .hatena-module-entries-access-ranking .urllist-categories {
  line-height: 1.4;
}

#box2 .hatena-module-entries-access-ranking .urllist-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 4px;
}

#box2 .hatena-module-entries-access-ranking .urllist-category-link {
  margin-top: 0;
}

/* タイトルのリンクをサムネイルと行の余白まで広げる。 */
#box2 :is(.recent-entries-item-inner > a[href], .entries-access-ranking-item-inner > .urllist-title-link[href])::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

#box2 :is(.recent-entries-item-inner > a[href], .entries-access-ranking-item-inner > .urllist-title-link[href]):focus-visible::after {
  outline: 2px solid var(--link);
  outline-offset: -2px;
  border-radius: 9px;
}

/* 注目記事の日付とカテゴリーは、それぞれのリンクを押せるようにする。 */
#box2 .entries-access-ranking-item-inner :is(.urllist-date-link > a, .urllist-category-link) {
  position: relative;
  z-index: 2;
}

@media (hover: hover) {
  #box2 :is(.hatena-module-recent-entries, .hatena-module-entries-access-ranking) .hatena-urllist > li:hover {
    border-color: var(--teal);
    background: var(--teal-pale);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #box2 :is(.hatena-module-recent-entries, .hatena-module-entries-access-ranking) .hatena-urllist > li {
    transition: none;
  }

  #box2 :is(.hatena-module-recent-entries, .hatena-module-entries-access-ranking) .hatena-urllist > li:hover {
    transform: none;
  }
}


/* スマホの記事詳細は左右の余白を8pxずつ詰める。 */
@media (max-width: 760px) {
  body.page-entry #main-inner .entry { padding-inline: 8px; }
}

/* タイトルとナビの先頭を本文の文字位置に揃える。 */
body {
  --kou-content-gutter: 20px;
  --kou-column-start: max(var(--kou-content-gutter), calc((100% - 760px) / 2));
  --kou-entry-inset: 0px;
  --kou-header-start: calc(var(--kou-column-start) + var(--kou-entry-inset));
}
body:has(#main-inner .entry) { --kou-entry-inset: 41px; }
@media (min-width: 1241px) {
  body { --kou-column-start: calc((100% - var(--article-width)) / 2); }
  body:has(#content-inner > #box2) {
    --kou-column-start: calc((100% - var(--article-width) - 300px - 28px) / 2);
  }
  body:has(#content-inner > #kou-toc-col):not(:has(#content-inner > #box2)) {
    --kou-column-start: calc(max(20px, (100% - var(--article-width) - 228px - 28px) / 2) + 256px);
  }
  body:has(#content-inner > #kou-toc-col):has(#content-inner > #box2) {
    --kou-column-start: calc(max(20px, (100% - var(--article-width) - 236px - 320px - 28px) / 2) + 250px);
  }
}
@media (max-width: 860px) {
  body { --kou-content-gutter: 14px; }
  body:has(#main-inner .entry) { --kou-entry-inset: 21px; }
}
@media (max-width: 760px) {
  body:is(.page-index, .page-entry) { --kou-column-start: 0px; }
  body.page-index:has(#main-inner .entry) { --kou-entry-inset: 16px; }
  body.page-entry:has(#main-inner .entry) { --kou-entry-inset: 8px; }
}
#blog-title, .global-nav { padding-inline-start: var(--kou-header-start); }
.global-nav ul, .global-nav li:first-child a { padding-inline-start: 0; }
