@charset "UTF-8";

/* ==================================================================
   30代女性の美容ブログ - site.css
   モバイルファースト。768px 以上をPC表示として上書きします。
   ================================================================== */

:root {
  --bg-page: #FFFFFF;
  --bg-content: #FFFFFF;
  --bg-soft: #F6ECE9;
  --bg-beige: #F3EFEA;
  --bg-toc: #FCFAF8;
  --text-main: #332E2C;
  --text-body: #514946;
  --text-sub: #807570;
  --accent: #B98782;
  --accent-dark: #8F625E;
  --link: #9A6661;
  --line: #E8DFDA;
  --caution-bg: #FFF7F1;
  --caution-line: #EAD9CC;
  --caution-text: #805D4D;

  --content-width: 1120px;
  --article-width: 760px;
  --sidebar-width: 280px;

  --page-pad: 18px;
  --header-h: 60px;
  --gap-section: 38px;
  --gap-para: 14px;

  --radius-img: 4px;
  --radius-box: 6px;

  --font-base: "Helvetica Neue", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN",
    "Meiryo", sans-serif;
}

/* ------------------------------------------------------------------
   ベース
   ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-base);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.85;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-img);
}

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

a:hover {
  color: var(--accent-dark);
}

h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0 0 var(--gap-para);
}

ul, ol {
  margin: 0 0 var(--gap-para);
  padding-left: 1.35em;
}

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--bg-content);
  color: var(--text-main);
  padding: 10px 16px;
  border: 1px solid var(--line);
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.text-link {
  color: var(--link);
  font-size: 0.94em;
}

.button {
  display: inline-block;
  background: var(--accent-dark);
  color: #fff;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-box);
  padding: 11px 26px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: #7d5450;
  color: #fff;
}

/* ------------------------------------------------------------------
   ヘッダー
   ------------------------------------------------------------------ */

/* すべてのページで、ヘッダーを淡いベージュに統一する */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-beige);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* 下線1pxを含めてヘッダー全体が --header-h になるようにする */
  min-height: calc(var(--header-h) - 1px);
}

/* ヘッダーのタイトルは長いので、MENUボタンの幅を残して2行まで折り返す */
.site-title {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 82px);
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: normal;
}

.site-title a {
  display: block;
  color: var(--text-main);
  text-decoration: none;
}

.site-title a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.15em;
}

.menu-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 7px 11px;
  cursor: pointer;
}

.menu-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 15px;
  height: 11px;
}

.menu-toggle__icon span {
  display: block;
  height: 1.5px;
  background: var(--text-main);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) {
  transform: translateY(4.75px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) {
  transform: translateY(-4.75px) rotate(-45deg);
}

/* 展開したメニューも、ヘッダーと同じ色にそろえる */
.global-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg-beige);
  border-bottom: 1px solid var(--line);
  padding: 6px var(--page-pad) 20px;
}

/* JavaScript有効時のみ、スマートフォンでメニューを折りたたむ。
   無効時はナビゲーションがそのまま表示される。 */
.js .global-nav {
  display: none;
}

.js .global-nav.is-open {
  display: block;
}

.global-nav__list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.global-nav__list li + li {
  border-top: 1px solid var(--line);
}

.global-nav__list a {
  display: block;
  padding: 13px 2px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
}

.global-nav__list a[aria-current="page"] {
  color: var(--accent-dark);
}

.nav-search {
  display: flex;
  gap: 8px;
}

.nav-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.nav-search input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: var(--bg-page);
  color: var(--text-body);
}

.nav-search__button {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 16px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-box);
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
}

/* ------------------------------------------------------------------
   レイアウト
   ------------------------------------------------------------------ */

.site-main {
  display: block;
  padding-bottom: 56px;
}

.layout {
  display: block;
  padding-top: 22px;
}

.layout__main {
  min-width: 0;
}

.sidebar {
  margin-top: 44px;
  min-width: 0;
}

/* ------------------------------------------------------------------
   トップページ
   ------------------------------------------------------------------ */

.home-block + .home-block {
  margin-top: var(--gap-section);
  padding-top: var(--gap-section);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head__title {
  font-size: 19px;
  line-height: 1.5;
  font-weight: 700;
  position: relative;
  padding-left: 13px;
}

.section-head__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head__more {
  flex: 0 0 auto;
  font-size: 13px;
}

.section-lead {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

/* ------------------------------------------------------------------
   トップページ専用サイドバー（運営者情報・おすすめ記事・月別アーカイブ）
   すべて .page-home を前置し、他ページへ影響させない。
   ここはスマートフォン（767px以下）の値。768px以上は下部のメディアクエリで上書きする。
   ------------------------------------------------------------------ */

.page-home .home-layout {
  width: calc(100% - 36px);
  margin-inline: auto;
  padding-top: 34px;
}

.page-home .home-layout__main {
  min-width: 0;
}

.page-home .home-sidebar {
  width: 100%;
  min-width: 0;
  margin-top: 38px;
  padding: 18px;
  background: transparent;
  position: static;
}

.page-home .home-sidebar-widget + .home-sidebar-widget {
  margin-top: 26px;
}

.page-home .home-sidebar-widget__title {
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
}

/* 運営者情報 */

.page-home .home-sidebar-profile__box {
  background: #FFFFFF;
  border: 1px solid #CFCFCF;
  border-radius: 3px;
  padding: 24px 18px;
  text-align: center;
}

.page-home .home-sidebar-profile__image {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
}

.page-home .home-sidebar-profile__name {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
}

.page-home .home-sidebar-profile__text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
}

.page-home .home-sidebar-profile__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  font-size: 14px;
}

/* カテゴリー（カテゴリー名を縦一列で並べる。件数は出さない） */

.page-home .home-sidebar-category__list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
}

.page-home .home-sidebar-category__item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.page-home .home-sidebar-category__link {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 11px 2px;
  color: var(--text-main);
  text-decoration: none;
}

.page-home .home-sidebar-category__name {
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
}

.page-home .home-sidebar-category__link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* 月別アーカイブ（年月を縦一列で並べる。件数は出さない） */

.page-home .home-sidebar-archive__list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
}

.page-home .home-sidebar-archive__item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.page-home .home-sidebar-archive__link {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 11px 2px;
  color: var(--text-main);
  text-decoration: none;
}

.page-home .home-sidebar-archive__label {
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
}

.page-home .home-sidebar-archive__link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   記事カード
   ------------------------------------------------------------------ */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* カード全体を縦のflexにして、公開日を card__meta の margin-top:auto で下端へ寄せる */
.card {
  display: flex;
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  overflow: hidden;
}

.card__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-beige);
}

/* 順位バッジ。cardGrid( ranked: true ) を指定した箇所だけに出る。
   画像の左上へ重ねる。pointer-events: none なので記事リンクの操作は妨げない */
/* 共通：位置・形・大きさ・文字の揃え方をここで管理する。
   順位別のルールでは色と影だけを指定する。
   四隅ともカードと同じ角丸にして、画像の左上隅にぴったり沿わせる */
.card__rank {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 48px;
  height: 28px;
  border-radius: var(--radius-box);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* 1位：金。明部と暗部を交互に置いて金属らしい階調にする */
.card__rank--1 {
  border: 1px solid #a77a00;
  background: linear-gradient(
    135deg,
    #a97700 0%,
    #d5a91d 24%,
    #f0d75a 47%,
    #c99608 70%,
    #e1bc31 100%
  );
  color: #fffdf5;
  text-shadow: 0 1px 1px rgba(91, 60, 0, 0.46);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.42), inset -1px 0 rgba(106, 71, 0, 0.18),
    0 2px 4px rgba(81, 55, 0, 0.24);
}

/* 2位：銀。明部を白くしすぎず、灰色一色にも見えないようにする */
.card__rank--2 {
  border: 1px solid #858b92;
  background: linear-gradient(
    135deg,
    #838991 0%,
    #b3b9c0 25%,
    #d9dde2 47%,
    #9ca2aa 70%,
    #c5cad0 100%
  );
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(55, 60, 66, 0.52);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.48), inset -1px 0 rgba(73, 78, 84, 0.2),
    0 2px 4px rgba(55, 59, 64, 0.22);
}

/* 3位：銅。赤茶一色にせず、明るいブロンズの部分を残す */
.card__rank--3 {
  border: 1px solid #914a1d;
  background: linear-gradient(
    135deg,
    #91491c 0%,
    #be692c 25%,
    #e19a58 47%,
    #ad5924 70%,
    #cf7a38 100%
  );
  color: #fffdfc;
  text-shadow: 0 1px 1px rgba(83, 35, 8, 0.5);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.35), inset -1px 0 rgba(94, 40, 11, 0.2),
    0 2px 4px rgba(78, 34, 10, 0.23);
}

/* 斜めの控えめな光沢。position: absolute なので中央の数字の位置はずれない。
   z-index: -1 で「地色の上・数字の下」に置き、数字が薄くならないようにする */
.card__rank--1::before,
.card__rank--2::before,
.card__rank--3::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  /* 1px 内側に入るぶん、角丸も 1px 小さくしてバッジの四隅からはみ出さないようにする */
  border-radius: calc(var(--radius-box) - 1px);
  background: linear-gradient(
    135deg,
    transparent 0%,
    transparent 32%,
    rgba(255, 255, 255, 0.24) 44%,
    rgba(255, 255, 255, 0.08) 56%,
    transparent 68%,
    transparent 100%
  );
  pointer-events: none;
}

/* 4位・5位：金銀銅ではなくサイトの通常色。大きさと形は共通ルールのまま */
.card__rank--4,
.card__rank--5 {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--accent-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 15px 16px;
}

.card__category {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--accent-dark);
  letter-spacing: 0.03em;
}

.card__title {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
  margin: 0 0 8px;
}

.card__link:hover .card__title {
  color: var(--accent-dark);
  text-decoration: underline;
}

.card__summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-body);
}

.card__meta {
  margin: auto 0 0;
  padding-top: 10px;
  font-size: 12px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state {
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 20px;
  font-size: 14.5px;
}

/* ------------------------------------------------------------------
   ページ見出し・パンくず
   ------------------------------------------------------------------ */

.breadcrumb {
  margin-bottom: 16px;
}

.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-sub);
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "›";
  margin: 0 8px;
  color: var(--line);
}

.breadcrumb__item a {
  color: var(--text-sub);
  text-decoration: none;
}

.breadcrumb__item a:hover {
  text-decoration: underline;
}

.page-heading {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.page-heading__title {
  font-size: 25px;
  line-height: 1.5;
  font-weight: 700;
  margin: 0;
}

.page-heading__lead {
  margin: 10px 0 0;
  font-size: 14.5px;
  color: var(--text-sub);
  line-height: 1.8;
}

.list-count {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

/* ------------------------------------------------------------------
   記事詳細
   ------------------------------------------------------------------ */

.article {
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 22px var(--page-pad) 30px;
}

.article-header {
  margin-bottom: 26px;
}

.article-category {
  margin: 0 0 8px;
  font-size: 12.5px;
}

.article-category a {
  display: inline-block;
  background: #FFFFFF;
  color: var(--accent-dark);
  border-radius: var(--radius-img);
  padding: 4px 11px;
  text-decoration: none;
}

.article-category a:hover {
  background: #FFFFFF;
}

/* 記事タイトルと枠付き見出しは、ヘッダー文言（.site-title）を基準に
   スマートフォンで +2px、768px以上で +4px のサイズにそろえる */
.article-title {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  margin: 0 0 12px;
}

.article-meta {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.ad-disclosure {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--text-sub);
  background: #FFFFFF;
  border-radius: var(--radius-img);
  padding: 8px 12px;
}

.article-eyecatch {
  margin: 0;
}

.article-eyecatch img {
  display: block;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
}

.article-body {
  max-width: var(--article-width);
}

.article-intro p:last-child {
  margin-bottom: 0;
}

.article-section {
  margin-top: var(--gap-section);
}

.article-body h2 {
  font-size: 21px;
  line-height: 1.55;
  font-weight: 700;
  margin: 0 0 16px;
  padding: 0 0 10px 12px;
  border-left: 4px solid var(--accent);
  border-bottom: 1px solid var(--line);
}

/* 記事本文の章見出しだけ、淡いベージュの枠付きボックスにする。
   .article-section の直下の h2 に限定するので、
   「この記事で分かること」と「目次」の見出しは今までどおり。
   border の一括指定だけで四辺を同じ 1px にそろえる。
   共通の .article-body h2 が持つ左のアクセント線はここでは使わない。 */
.page-article .article-body .article-section > h2,
.page-article .article-body .learn-box__title {
  /* 枠付き見出しはすべて同じサイズ。上下の padding は変えず、余白の見え方を保つ */
  font-size: 16px;
  background: var(--bg-beige);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 12px 14px;
  margin: 0 0 18px;
}

.article-body h3 {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  margin: 26px 0 12px;
  color: var(--text-main);
}

.body-list {
  margin: 0 0 var(--gap-para);
  padding-left: 1.3em;
}

.body-list li {
  margin-bottom: 7px;
}

.body-list li::marker {
  color: var(--accent);
}

.body-list--ordered li::marker {
  color: var(--accent-dark);
  font-weight: 700;
}

/* この記事で分かること */

/* 見出しを章見出しと同じ横幅のボックスにするため、囲み側には内側余白を置かない */
.learn-box {
  margin-top: 24px;
  background: #FFFFFF;
  border-radius: var(--radius-box);
  padding: 0;
}

.learn-box__title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text-main);
}

.learn-box__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.learn-box__list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 14.5px;
  line-height: 1.75;
}

.learn-box__list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.learn-box__list li:last-child {
  margin-bottom: 0;
}

/* 目次 */

.toc {
  margin-top: 24px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 17px;
}

/* 子は見出しだけなので、並べ方の指定は最小限にとどめる */
.toc__head {
  display: flex;
  align-items: center;
}

.toc__title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
}

.toc__body {
  margin-top: 12px;
}

.toc__list,
.toc__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.toc__item {
  counter-increment: toc;
  margin-bottom: 8px;
}

.toc__item > a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.65;
}

.toc__item > a::before {
  content: counter(toc) ".";
  color: var(--accent);
  font-weight: 700;
  margin-right: 7px;
}

.toc__item > a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.toc__sub {
  margin: 6px 0 0 18px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.toc__sub li {
  margin-bottom: 5px;
}

.toc__sub a {
  color: var(--text-body);
  font-size: 13.5px;
  text-decoration: none;
}

.toc__sub a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* 装飾ボックス */

.box {
  border-radius: var(--radius-img);
  padding: 15px;
  margin: 0 0 var(--gap-para);
}

.box__title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 15px;
}

.box p:last-child,
.box ul:last-child {
  margin-bottom: 0;
}

.box ul {
  margin: 0;
  padding-left: 1.25em;
}

.box li {
  margin-bottom: 5px;
  font-size: 14.5px;
  line-height: 1.8;
}

.box--point {
  background: #FFFFFF;
  border-left: 4px solid var(--accent);
}

.box--point .box__title {
  color: var(--accent-dark);
}

.box--caution {
  background: #FFFFFF;
  border: 1px solid var(--caution-line);
}

.box--caution .box__title {
  color: var(--caution-text);
}

/* チェックリスト */

.checklist {
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 16px 17px;
  margin: 0 0 var(--gap-para);
}

.checklist__title {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
}

/* 確認事項を文章で書く場合。枠・背景・余白は箇条書きのときと同じ */
.checklist__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-body);
}

.checklist__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist__items li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 14.5px;
  line-height: 1.75;
}

.checklist__items li:last-child {
  margin-bottom: 0;
}

.checklist__items li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* 比較表 */

.table-figure {
  margin: 0 0 var(--gap-para);
}

.table-caption {
  margin: 0 0 7px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-hint {
  margin-left: 4px;
  font-size: 12px;
  color: var(--accent-dark);
}

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--bg-content);
  font-size: 14px;
  line-height: 1.7;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

.compare-table thead th {
  background: #FFFFFF;
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
}

.compare-table tbody th {
  background: #FFFFFF;
  color: var(--text-main);
  font-weight: 600;
}

/* 1列目が「オイ／ル」のように途中で折り返さないようにする */
.compare-table th:first-child,
.compare-table td:first-child {
  min-width: 6em;
}


/* まとめ */

/* まとめを文章で書く場合 */
.summary-text {
  margin: 0 0 var(--gap-para);
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-body);
}

/* まとめの下にはもう何も置かないので、余分な下余白は付けない */
.summary-section .summary-text {
  margin-bottom: 0;
}

.summary-section .summary-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  counter-reset: summary;
}

.summary-list li {
  counter-increment: summary;
  position: relative;
  padding-left: 30px;
  margin-bottom: 9px;
  font-size: 14.5px;
  line-height: 1.8;
}

.summary-list li::before {
  content: counter(summary);
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 出典 */

/* 出典の見出しも、ほかの枠付き見出しと同じサイズ・同じ枠にそろえる
   （文字サイズと枠線は .article-section > h2 の一括指定に任せる） */

/* 参考にした情報をリンク入りの文章で書く場合 */
.sources__text {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-body);
}

.sources__list {
  margin: 0 0 10px;
  padding-left: 1.3em;
  font-size: 14px;
}

.sources__list li {
  margin-bottom: 5px;
}

.sources__note {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* 関連記事・運営者情報 */

.related {
  margin-top: 34px;
}

.related__title,
.profile-box__title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-left: 13px;
  position: relative;
}

.related__title::before,
.profile-box__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* 関連記事（1件を1行の横長。左に画像、右にテキスト） */

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-item + .related-item {
  margin-top: 14px;
}

.related-item__link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.related-item__thumb {
  flex: 0 0 auto;
  width: 112px;
  height: 63px;
  object-fit: cover;
  border-radius: var(--radius-img);
  background: var(--bg-beige);
}

.related-item__body {
  display: block;
  min-width: 0;
}

.related-item__category {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-sub);
}

.related-item__title {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-main);
}

/* 要約は2〜3行で切り上げ、カードの高さがそろうようにする */
.related-item__summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-body);
}

.related-item__link:hover .related-item__title {
  color: var(--accent-dark);
  text-decoration: underline;
}

.profile-box {
  margin-top: 34px;
}

.profile-box__inner {
  display: flex;
  gap: 16px;
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 18px;
}

.profile-box__inner img {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
}

.profile-box__name {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--text-main);
  font-size: 15px;
}

.profile-box__text {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.8;
}

.profile-box__notes {
  margin: 0 0 10px;
  padding-left: 1.2em;
  font-size: 13px;
  color: var(--text-sub);
}

.profile-box__notes li {
  margin-bottom: 4px;
}

/* ------------------------------------------------------------------
   サイドバー
   ------------------------------------------------------------------ */

.widget + .widget {
  margin-top: 26px;
}

.widget__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.widget-search__label {
  display: block;
  font-size: 12.5px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.widget-search__row {
  display: flex;
  gap: 8px;
}

.widget-search input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: var(--bg-content);
  color: var(--text-body);
}

.widget-search button {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 15px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-box);
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
}

.widget-profile {
  display: flex;
  gap: 12px;
}

.widget-profile img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
}

.widget-profile__name {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.widget-profile__text {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.75;
}

.mini-post-list,
.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mini-post {
  border-bottom: 1px solid var(--line);
}

.mini-post__link {
  display: flex;
  gap: 11px;
  padding: 11px 0;
  text-decoration: none;
  color: inherit;
}

.mini-post__thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 44px;
  object-fit: cover;
}

.mini-post__text {
  min-width: 0;
}

.mini-post__title {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
}

.mini-post__link:hover .mini-post__title {
  color: var(--accent-dark);
  text-decoration: underline;
}

.mini-post__date {
  display: block;
  font-size: 11.5px;
  color: var(--text-sub);
  margin-top: 3px;
}

.widget-list li {
  border-bottom: 1px solid var(--line);
}

.widget-list a {
  display: block;
  padding: 10px 2px;
  font-size: 14px;
  color: var(--text-main);
  text-decoration: none;
}

.widget-list a::before {
  content: "－";
  color: var(--accent);
  margin-right: 7px;
}

.widget-list a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   カテゴリー一覧・アーカイブ一覧
   ------------------------------------------------------------------ */

.cat-row-list,
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.cat-row {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.cat-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.cat-row__name {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.cat-row__name a {
  color: var(--text-main);
  text-decoration: none;
}

.cat-row__name a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.cat-row__count {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-sub);
}

.cat-row__desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.archive-list li {
  border-bottom: 1px solid var(--line);
}

.archive-row a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 2px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 15px;
}

.archive-row a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.archive-row__count {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------------
   検索
   ------------------------------------------------------------------ */

.search-form {
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 17px;
  margin-bottom: 20px;
}

.search-form__label {
  display: block;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.search-form__row {
  display: flex;
  gap: 8px;
}

.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: var(--bg-page);
  color: var(--text-body);
}

.search-form button {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 18px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-box);
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
}

.search-status {
  font-size: 13.5px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.search-results .card-grid {
  gap: 20px;
}

/* ------------------------------------------------------------------
   固定ページ
   ------------------------------------------------------------------ */

.static-body {
  background: var(--bg-content);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 22px var(--page-pad) 26px;
  max-width: var(--article-width);
}

.static-body h2 {
  font-size: 19px;
  line-height: 1.55;
  font-weight: 700;
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

.static-body h2:first-child {
  margin-top: 0;
}

/* 運営者情報・編集方針・プライバシーポリシー・サイトマップは、セクション見出しを
   淡いベージュの枠付きボックスにする（記事の章見出しと同じ方向性）。
   border の一括指定で四辺を同じ 1px にそろえ、左のアクセント線は使わない。
   文字サイズとセクション間隔は固定ページ用の値のまま。 */
.page-boxed-heading .static-body > h2 {
  width: 100%;
  background: var(--bg-beige);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 12px 14px;
  margin: 30px 0 18px;
}

.page-boxed-heading .static-body > h2:first-child {
  margin-top: 0;
}

.static-body p {
  font-size: 15px;
  line-height: 1.85;
}

.static-body code {
  background: var(--bg-beige);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.92em;
}

.sitemap__date {
  color: var(--text-sub);
  font-size: 12px;
  margin-left: 6px;
}

.sitemap__articles li {
  margin-bottom: 9px;
}

/* フォーム */

.contact-form {
  margin-top: 18px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-required {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--caution-text);
  background: var(--caution-bg);
  border: 1px solid var(--caution-line);
  border-radius: 3px;
  padding: 1px 6px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.7;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: var(--bg-page);
  color: var(--text-body);
}

.form-note {
  font-size: 13px;
  color: var(--text-sub);
}

/* 404 */

.notfound {
  padding: 48px 0 24px;
  max-width: var(--article-width);
}

.notfound__title {
  font-size: 25px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.notfound__text {
  font-size: 15px;
}

.notfound__links {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.notfound__links li {
  border-bottom: 1px solid var(--line);
}

.notfound__links a {
  display: block;
  padding: 12px 2px;
  color: var(--text-main);
  text-decoration: none;
}

.notfound__links a::before {
  content: "－";
  color: var(--accent);
  margin-right: 7px;
}

.notfound__links a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   フッター
   ------------------------------------------------------------------ */

.site-footer {
  background: var(--bg-beige);
  border-top: 1px solid var(--line);
  padding: 24px 0 0;
}

.site-footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-footer__nav {
  width: 100%;
}

/* スマートフォンは2列。5番目だけ下段中央に置く */
.site-footer__nav ul {
  list-style: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 10px;
}

.site-footer__nav li {
  min-width: 0;
  text-align: center;
}

.site-footer__nav li:nth-child(5) {
  grid-column: 1 / -1;
  justify-self: center;
}

.site-footer__nav a {
  display: inline-block;
  padding: 3px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  text-decoration: none;
}

.site-footer__nav a:hover {
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
}

.site-footer__copyright {
  margin: 22px 0 0;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-sub);
  font-size: 11.5px;
  line-height: 1.6;
}

/* ==================================================================
   PC表示（768px以上）
   ================================================================== */

@media (min-width: 768px) {
  :root {
    --page-pad: 24px;
    --header-h: 72px;
    --gap-section: 48px;
    --gap-para: 16px;
  }

  body {
    font-size: 16px;
    line-height: 1.9;
  }

  /* ヘッダー（タイトルのサイズは幅ごとに下のメディアクエリで指定する） */

  .menu-toggle {
    display: none;
  }

  .global-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0;
    border: 0;
    background: none;
  }

  .js .global-nav,
  .js .global-nav.is-open {
    display: flex;
  }

  .global-nav__list {
    display: flex;
    gap: 22px;
    margin: 0;
  }

  .global-nav__list li + li {
    border-top: 0;
  }

  .global-nav__list a {
    padding: 0;
    font-size: 14px;
    white-space: nowrap;
  }

  .global-nav__list a:hover {
    color: var(--accent-dark);
  }

  .nav-search input {
    width: 148px;
    padding: 7px 10px;
    font-size: 13.5px;
  }

  .nav-search__button {
    padding: 7px 13px;
    font-size: 13px;
  }

  /* レイアウト */

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: 40px;
    align-items: start;
    padding-top: 28px;
  }

  .sidebar {
    margin-top: 0;
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }

  /* 記事詳細ページだけ追従を解除し、本文と一緒にスクロールさせる */
  .page-article .sidebar {
    position: static;
    top: auto;
    align-self: start;
  }

  /* トップページ */

  /* 768〜1023pxは1カラムのまま、サイドバー内の余白だけPCの値にする */

  .page-home .home-layout {
    width: calc(100% - 48px);
    padding-top: 44px;
  }

  .page-home .home-sidebar {
    margin-top: 48px;
    padding: 20px 19px 24px;
  }

  .page-home .home-sidebar-widget + .home-sidebar-widget {
    margin-top: 30px;
  }

  .page-home .home-sidebar-widget__title {
    margin-bottom: 12px;
    padding: 0;
    font-size: 21px;
  }

  .page-home .home-sidebar-profile__box {
    padding: 28px 24px;
  }

  .page-home .home-sidebar-profile__image {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
  }

  .page-home .home-sidebar-profile__name {
    font-size: 18px;
  }

  .page-home .home-sidebar-category__link {
    padding: 12px 2px;
  }

  .page-home .home-sidebar-category__name {
    font-size: 14.5px;
  }

  .page-home .home-sidebar-archive__link {
    padding: 12px 2px;
  }

  .page-home .home-sidebar-archive__label {
    font-size: 14.5px;
  }

  .section-head__title {
    font-size: 22px;
  }

  .section-head__more {
    font-size: 13.5px;
  }

  /* カード */

  .card-grid {
    gap: 24px;
  }

  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card__title {
    font-size: 16.5px;
  }

  /* 順位バッジは少しだけ大きく。位置・形・色は画面幅で変えない */
  .card__rank {
    top: 0;
    left: 0;
    width: 52px;
    height: 30px;
    font-size: 17px;
  }

  /* 見出し */

  .page-heading__title {
    font-size: 32px;
    line-height: 1.45;
  }

  .page-heading {
    margin-bottom: 24px;
    padding-bottom: 18px;
  }

  /* 記事 */

  .article {
    padding: 32px 36px 40px;
  }

  .article-title {
    font-size: 22px;
    line-height: 1.45;
  }

  .article-meta,
  .ad-disclosure {
    font-size: 13px;
  }

  .article-body h2 {
    font-size: 25px;
    line-height: 1.55;
    padding: 0 0 12px 14px;
    margin-bottom: 18px;
  }

  .page-article .article-body .article-section > h2,
  .page-article .article-body .learn-box__title {
    /* 上下の padding は 14px のまま。文字だけ大きくして余白の見え方は保つ */
    font-size: 22px;
    padding: 14px 16px;
    margin-bottom: 20px;
  }

  .article-body h3 {
    font-size: 20px;
    margin: 30px 0 14px;
  }

  .learn-box {
    margin-top: 28px;
  }

  .learn-box__title {
    font-size: 17px;
  }

  .learn-box__list li {
    font-size: 15.5px;
  }

  .toc {
    padding: 22px;
    margin-top: 28px;
  }

  .toc__title {
    font-size: 17px;
  }

  .toc__item > a {
    font-size: 15.5px;
  }

  .toc__sub a {
    font-size: 14.5px;
  }

  .box {
    padding: 18px;
  }

  .box li,
  .checklist__items li,
  .summary-list li {
    font-size: 15.5px;
  }

  .checklist {
    padding: 20px 22px;
  }

  .compare-table {
    min-width: 0;
    font-size: 15px;
  }

  .compare-table th,
  .compare-table td {
    padding: 12px;
  }

  .table-hint {
    display: none;
  }

  .checklist__text,
  .summary-text {
    font-size: 15.5px;
  }

  .sources__text {
    font-size: 14.5px;
  }

  .sources__list {
    font-size: 15px;
  }

  .related,
  .profile-box {
    margin-top: 44px;
  }

  .related__title,
  .profile-box__title {
    font-size: 22px;
  }

  .related-item + .related-item {
    margin-top: 16px;
  }

  .related-item__link {
    gap: 16px;
    padding: 16px;
  }

  .related-item__thumb {
    width: 160px;
    height: 90px;
  }

  .related-item__title {
    font-size: 16.5px;
  }

  .related-item__summary {
    -webkit-line-clamp: 3;
    font-size: 14px;
  }

  .profile-box__inner {
    padding: 24px;
    gap: 20px;
  }

  .profile-box__inner img {
    width: 80px;
    height: 80px;
  }

  /* 固定ページ */

  .static-body {
    padding: 32px 36px 36px;
  }

  .static-body h2 {
    font-size: 22px;
    margin: 36px 0 14px;
  }

  .page-boxed-heading .static-body > h2 {
    padding: 14px 16px;
    margin: 36px 0 20px;
  }

  .page-boxed-heading .static-body > h2:first-child {
    margin-top: 0;
  }

  .static-body p {
    font-size: 16px;
    line-height: 1.9;
  }

  /* 404 */

  .notfound {
    padding: 64px 0 32px;
  }

  .notfound__title {
    font-size: 32px;
    line-height: 1.45;
  }

  /* フッター */

  .site-footer {
    padding-top: 28px;
  }

  .site-footer__inner {
    padding-inline: 24px;
  }

  /* PCは横一列で中央寄せ */
  .site-footer__nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 30px;
    row-gap: 10px;
  }

  .site-footer__nav li:nth-child(5) {
    grid-column: auto;
    justify-self: auto;
  }

  .site-footer__nav a {
    padding: 2px 0;
    font-size: 13px;
  }

  .site-footer__copyright {
    margin-top: 24px;
    padding: 13px 24px;
    font-size: 12px;
  }
}

/* タブレット幅ではヘッダーが窮屈になるため、検索欄はサイドバーと検索ページに任せる */

@media (min-width: 768px) and (max-width: 999px) {
  .nav-search {
    display: none;
  }

  .global-nav,
  .global-nav__list {
    gap: 18px;
  }

  .site-title {
    flex: 0 1 240px;
    max-width: 240px;
    font-size: 14.5px;
    line-height: 1.4;
    white-space: normal;
  }
}

/* 1000〜1199pxは検索欄が復活するため、タイトル幅とナビの間隔を詰める */

@media (min-width: 1000px) and (max-width: 1199px) {
  .site-title {
    flex: 0 1 300px;
    max-width: 300px;
    font-size: 15px;
    line-height: 1.4;
    white-space: normal;
  }

  .global-nav {
    gap: 16px;
  }

  .global-nav__list {
    gap: 16px;
  }

  .nav-search input {
    width: 130px;
  }
}

/* 1200px以上はタイトルを1行で表示できる */

@media (min-width: 1200px) {
  .site-title {
    flex: 0 0 auto;
    max-width: none;
    font-size: 18px;
    line-height: 1.4;
    white-space: nowrap;
  }
}

/* 768〜899px は2カラムの本文が狭くなるため、記事の内側余白を抑える */

@media (min-width: 768px) and (max-width: 899px) {
  .article,
  .static-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .compare-table {
    min-width: 460px;
  }

  .table-hint {
    display: inline;
  }
}

/* 3列グリッド（900px以上） */

@media (min-width: 900px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------------------------------------------
   トップページの2カラム（1024px以上）
   メイン800px ＋ 間隔20px ＋ サイドバー336px ＝ 1156px
   ------------------------------------------------------------------ */

@media (min-width: 1024px) {
  .page-home .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 800px) 336px;
    column-gap: 20px;
    align-items: start;
    width: calc(100% - 48px);
    max-width: 1156px;
    margin-inline: auto;
    padding-top: 44px;
  }

  .page-home .home-layout__main {
    min-width: 0;
  }

  /* 右カラムは追従させず、左カラムと一緒にスクロールさせる */
  .page-home .home-sidebar {
    width: 336px;
    min-width: 0;
    margin-top: 0;
    position: static;
    top: auto;
    align-self: start;
  }
}

/* 2カラム化でメインが狭くなる 1024〜1199px は、最新記事を2列にして詰まりを防ぐ */

@media (min-width: 1024px) and (max-width: 1199px) {
  .page-home .home-layout__main .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 主要な見出しの文字サイズ
 * ------------------------------------------------------------------
 * トップページと記事詳細ページを除いたページでは、ページ上部のタイトル・
 * セクション見出し・枠内の見出しを、記事詳細ページの見出しと同じ大きさに
 * そろえる。文字サイズだけを上書きし、余白・枠線・背景には触れない。
 * 記事カードや最近の記事など、見出しではない文字は対象にしない。
 * 既存の指定より後ろに置いて、詳細度と記述順の両方で効くようにしている。 */

body:not(.page-home):not(.page-article) {
  --content-heading-font-size: 16px;
}

body:not(.page-home):not(.page-article) .page-heading__title,
body:not(.page-home):not(.page-article) .static-body > h2,
body:not(.page-home):not(.page-article) .cat-row__name,
body:not(.page-home):not(.page-article) .widget__title,
body:not(.page-home):not(.page-article) .box__title,
body:not(.page-home):not(.page-article) .notfound__title {
  font-size: var(--content-heading-font-size);
}

@media (min-width: 768px) {
  body:not(.page-home):not(.page-article) {
    --content-heading-font-size: 22px;
  }
}

/* 動きを減らす設定への対応 */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
