/* ==================================================
 * みなしるべ 通常投稿 CSS v3.5.10
 * Stage 5: canonical cleanup trial
 * Base: minashirube-site-v2.3.6.css
 * Release date: 2026-09-27
 *
 * 目的:
 * - 旧レイヤー / 後勝ちレイヤーを1本の現行仕様へ統合
 * - 空の宣言・歴史的コメント・重複メディアクエリを整理
 * - 表示仕様は v3.4.2 を維持
 * - サイドバーの旧固定HTML版RELATED CONTENTを廃止し、Cocoon [C] 関連記事へ統合
 * - PCではCocoon標準の「サイドバースクロール追従」を利用し、関連記事を回遊導線として活用
 * - 読者向け見出しを日本語表記へ統一
 * - PCは追従関連記事を主導線とし、重複する読了後の前後記事ナビを非表示
 * - タブレット・スマホはサイドバー非表示のため、読了後の「同じテーマの記事」を維持
 * - 記事補助ボックス3種は、左アクセント＋同系色の細枠で構造を統一
 * - 「選ぶときのしるべ」のSTEP説明文を共通クラスで一段インデント
 * ================================================== */

/* ==================================================
   1. Article shell / meta
   ================================================== */
body.single-post,
.single-post #content,
.single-post #content-in,
.single-post #main,
.single-post article.article,
.single-post .entry-content,
body.single-post #breadcrumb,
body.single-post .breadcrumb,
body.single-post .breadcrumb.sbp-main-before,
body.single-post .breadcrumb-container,
body.single-post .breadcrumb-wrap {
  background-color: #FFFEFC !important;
}

.single-post .entry-title {
  margin: 0 0 12px;
  padding: 0;
  color: var(--ms-navy);
  font-size: clamp(27px, 2.55vw, 32px);
  line-height: 1.46;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.single-post .date-tags,
.single-post .post-date,
.single-post .post-update {
  color: var(--ms-warmgray);
  font-size: 12px;
}

.single-post .date-tags {
  margin-bottom: 24px;
}

.single-post .author-info,
.single-post .sns-follow {
  display: none !important;
}

/* ==================================================
   2. Typography / headings / lists
   ================================================== */
.single-post .entry-content {
  --ms-article-indent: 16px;
  --ms-article-subindent: 32px;
  --ms-h3-marker: linear-gradient(
    90deg,
    rgba(122, 155, 131, 0.52) 0%,
    rgba(122, 155, 131, 0.40) 36%,
    rgba(122, 155, 131, 0.23) 66%,
    rgba(122, 155, 131, 0.08) 90%,
    rgba(122, 155, 131, 0) 100%
  );

  color: var(--ms-text);
  font-size: 16.5px;
  line-height: 1.82;
}

.single-post .entry-content p {
  margin-top: 0;
  margin-bottom: 14px;
  padding-left: 0;
  color: var(--ms-text);
  font-size: 16.5px;
  line-height: 1.82;
}

.single-post .entry-content li {
  color: var(--ms-text);
  font-size: 16.5px;
  line-height: 1.76;
}

.single-post .entry-content h2 {
  position: relative;
  margin: 40px 0 18px;
  padding: 10px 14px 11px 16px;
  color: var(--ms-navy) !important;
  background: #F3F7F4 !important;
  border: 0 !important;
  border-left: 5px solid rgba(122, 155, 131, 0.88) !important;
  font-size: clamp(22px, 2.3vw, 25px);
  line-height: 1.46;
  font-weight: 700;
}

.single-post .entry-content h2::before,
.single-post .entry-content h2::after {
  content: none !important;
  display: none !important;
}

.single-post .entry-content h3 {
  display: inline-block !important;
  width: auto !important;
  max-width: calc(100% - 18px) !important;
  position: relative;
  isolation: isolate;
  margin-top: 25px;
  margin-right: 0;
  margin-bottom: 10px;
  margin-left: 0;
  padding: 2px 1px 4px;
  color: var(--ms-navy) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
}

.single-post .entry-content h3::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: -1px;
  bottom: 6px;
  width: calc(100% + 20px);
  height: 7px;
  background: var(--ms-h3-marker);
  border-radius: 999px;
  z-index: -1;
  pointer-events: none;
}

.single-post .entry-content h3::before {
  content: none !important;
  display: none !important;
}

.single-post .entry-content h4,
.single-post .entry-content h5,
.single-post .entry-content h6 {
  color: var(--ms-navy);
  border: 0;
}

.single-post .entry-content h4 {
  margin: 18px 0 7px;
  padding: 0;
  background: transparent;
  font-size: 16.5px;
  line-height: 1.55;
  font-weight: 700;
}

.single-post .entry-content h5,
.single-post .entry-content h6 {
  background: none;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
  margin-top: 9px;
  margin-bottom: 18px;
  padding-left: 1.55em;
}

.single-post .entry-content li + li {
  margin-top: 4px;
}

.single-post .entry-content ul > li::marker {
  color: var(--ms-warmgray);
  font-size: 0.92em;
}

.single-post .entry-content ol > li::marker {
  color: var(--ms-warmgray);
  font-weight: 700;
}

.single-post .entry-content li > ul,
.single-post .entry-content li > ol {
  margin-top: 6px;
  margin-bottom: 5px;
}

/* ==================================================
   3. Editorial grid
   ================================================== */
.single-post .entry-content > h2 ~ :is(
  p,
  h3,
  ul,
  ol,
  blockquote,
  .wp-block-table,
  .wp-block-group,
  .wp-block-image,
  figure
) {
  margin-left: var(--ms-article-indent);
  box-sizing: border-box;
}

.single-post .entry-content > h2 ~ :is(
  h3,
  ul,
  ol,
  blockquote,
  .wp-block-table,
  .wp-block-group,
  .wp-block-image,
  figure
) {
  width: calc(100% - var(--ms-article-indent));
  max-width: calc(100% - var(--ms-article-indent));
}

/* H3直後の連続コンテンツ5ブロックまで、さらに一段内側へ。 */
.single-post .entry-content > h3
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
.single-post .entry-content > h3
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
.single-post .entry-content > h3
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
.single-post .entry-content > h3
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
.single-post .entry-content > h3
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
+ :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure) {
  margin-left: var(--ms-article-subindent) !important;
  width: calc(100% - var(--ms-article-subindent));
  max-width: calc(100% - var(--ms-article-subindent));
  box-sizing: border-box;
}

/* ==================================================
   4. Article components
   ================================================== */
.single-post .entry-content .ms-article-points {
  margin: 2rem 16px;
  padding: 1rem 1.25rem;
  background: #F5F7F8;
  border-top: 1px solid rgba(95, 118, 133, 0.28);
  border-right: 1px solid rgba(95, 118, 133, 0.28);
  border-bottom: 1px solid rgba(95, 118, 133, 0.28);
  border-left: 3px solid var(--ms-bluegray);
  border-radius: 0;
  box-shadow: none;
  color: var(--ms-text);
  font-size: inherit;
  line-height: inherit;
  box-sizing: border-box;
}

.single-post .entry-content .ms-article-points > :first-child {
  margin-top: 0;
}

.single-post .entry-content .ms-article-points > :last-child {
  margin-bottom: 0;
}

.single-post .entry-content .ms-article-points > p:first-child strong {
  color: var(--ms-navy);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.single-post .entry-content .ms-article-points ul {
  margin: 0.75rem 0 0;
  padding-left: 1.35em;
}

.single-post .entry-content .ms-article-points li {
  margin: 0.3em 0;
  font-size: inherit;
  line-height: inherit;
}

.single-post .entry-content .ms-article-research {
  margin: 26px 0 34px;
  padding: 16px 18px;
  background: rgba(122, 155, 131, 0.08);
  border-top: 1px solid rgba(122, 155, 131, 0.30);
  border-right: 1px solid rgba(122, 155, 131, 0.30);
  border-bottom: 1px solid rgba(122, 155, 131, 0.30);
  border-left: 3px solid var(--ms-sage);
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.single-post .entry-content .wp-block-group.ms-article-research {
  margin-left: 16px;
  margin-right: 16px;
}

.single-post .entry-content .ms-article-research > p,
.single-post .entry-content .ms-article-research > .wp-block-group__inner-container > p {
  margin: 0 0 7px;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.72;
}

.single-post .entry-content .ms-article-research > p:first-child,
.single-post .entry-content .ms-article-research > .wp-block-group__inner-container > p:first-child {
  margin-bottom: 9px;
  color: var(--ms-navy);
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 700;
}

.single-post .entry-content .ms-article-research > p:last-child,
.single-post .entry-content .ms-article-research > .wp-block-group__inner-container > p:last-child {
  margin-bottom: 0;
  color: var(--ms-warmgray);
  font-size: 12.5px;
}

.single-post .ms-shirube-box {
  margin-top: 20px;
  margin-bottom: 26px;
  padding: 16px 18px 17px 20px;
  background: #FFFDF8;
  border-top: 1px solid rgba(230, 162, 60, 0.32);
  border-right: 1px solid rgba(230, 162, 60, 0.32);
  border-bottom: 1px solid rgba(230, 162, 60, 0.32);
  border-left: 3px solid var(--ms-gold);
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.single-post .entry-content .wp-block-group.ms-shirube-box {
  margin-left: 16px;
  margin-right: 16px;
  font-size: inherit;
  line-height: inherit;
}

.single-post .ms-shirube-box > p:first-child {
  margin: 0 0 10px;
  padding: 0;
  color: var(--ms-navy);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.single-post .ms-shirube-box > p:not(:first-child) {
  margin: 5px 0 0;
  padding: 0;
  color: var(--ms-text);
}

.single-post .entry-content .wp-block-group.ms-shirube-box p,
.single-post .entry-content .wp-block-group.ms-shirube-box li {
  font-size: 1em !important;
  line-height: 1.8 !important;
}

.single-post .ms-shirube-box p,
.single-post .ms-shirube-box ul,
.single-post .ms-shirube-box ol {
  margin-left: 0 !important;
  width: auto !important;
  max-width: none !important;
}

/* 「選ぶときのしるべ」STEP表示 */
.single-post .ms-shirube-box .ms-shirube-step {
  margin-top: 9px;
}

.single-post .ms-shirube-box .ms-shirube-step-body {
  display: block;
  margin-top: 2px;
  padding-left: 1.25em;
}

.single-post .entry-content .ms-article-mobile-meta {
  display: none;
}

.single-post .entry-content .ms-table-example-note {
  margin: 4px 0 8px;
  color: var(--ms-warmgray);
  font-size: 12.5px;
  line-height: 1.6;
}

.monetization-slot {
  width: 100%;
  box-sizing: border-box;
}

.monetization-slot:empty,
.single-post .monetization-slot:empty,
.single-post .sidebar .widget:has(.monetization-slot:empty) {
  display: none;
}

.monetization-slot-a,
.monetization-slot-b,
.monetization-slot-c {
  margin: 32px 0;
}

/* ==================================================
   5. Tables
   ================================================== */
.single-post .wp-block-table {
  max-width: 100%;
  margin: 24px 0 30px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.single-post .wp-block-table table,
.single-post .entry-content > table,
.single-post .entry-content .ms-table-wide table {
  width: 100%;
  border-collapse: collapse;
  border-color: var(--ms-border) !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  background: #FFFFFF !important;
}

.single-post .entry-content .wp-block-table thead,
.single-post .entry-content > table thead,
.single-post .entry-content .ms-table-wide thead,
.single-post .entry-content .wp-block-table thead tr,
.single-post .entry-content > table thead tr,
.single-post .entry-content .ms-table-wide thead tr {
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.single-post .wp-block-table th,
.single-post .wp-block-table td,
.single-post .entry-content > table th,
.single-post .entry-content > table td {
  padding: 10px 11px;
  vertical-align: middle;
  font-size: 14.5px;
  line-height: 1.65;
}

.single-post .entry-content .wp-block-table thead th,
.single-post .entry-content .wp-block-table th,
.single-post .entry-content > table thead th,
.single-post .entry-content > table th,
.single-post .entry-content .ms-table-wide thead th,
.single-post .entry-content .ms-table-wide th {
  background: #DDE8E0 !important;
  color: var(--ms-navy) !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 1px solid #B8C9BE !important;
  font-weight: 700;
}

.single-post .entry-content .wp-block-table td,
.single-post .entry-content > table td,
.single-post .entry-content .ms-table-wide td {
  color: var(--ms-text);
  border-color: var(--ms-border) !important;
}

.single-post .entry-content .wp-block-table thead th:last-child,
.single-post .entry-content > table thead th:last-child,
.single-post .entry-content .ms-table-wide thead th:last-child {
  border-right: 0 !important;
}

.single-post .entry-content .wp-block-table thead + tbody tr:first-child td,
.single-post .entry-content > table thead + tbody tr:first-child td,
.single-post .entry-content .ms-table-wide thead + tbody tr:first-child td {
  border-top: 1px solid var(--ms-border) !important;
}

.single-post .entry-content .wp-block-table tbody td,
.single-post .entry-content > table tbody td,
.single-post .entry-content .ms-table-wide tbody td,
.single-post .entry-content .wp-block-table tbody tr:nth-child(even) td,
.single-post .entry-content > table tbody tr:nth-child(even) td,
.single-post .entry-content .ms-table-wide tbody tr:nth-child(even) td {
  background: #FFFFFF !important;
}

/* ==================================================
   6. Sidebar / share
   ================================================== */
.single-post .sidebar .widget {
  margin: 0 0 34px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* みなしるべについて */
.single-post .ms-sidebar-about {
  color: var(--ms-text);
}

.single-post .ms-sidebar-about > p:first-child {
  margin: 0 0 11px;
  padding: 0 0 8px;
  color: var(--ms-navy);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--ms-border);
}

.single-post .ms-sidebar-about p {
  margin: 0 0 11px;
  color: var(--ms-text);
  font-size: 14px;
  line-height: 1.78;
}

.single-post .ms-sidebar-about a {
  font-size: 13.5px;
}

/* 関連記事 / Cocoon [C] 関連記事 */
.single-post .sidebar .widget_related_entries {
  color: var(--ms-text);
}

/*
 * Cocoon側でウィジェットタイトルが出力される場合は、その実要素を使う。
 * 追従エリアへ移動した際などにタイトル要素が出力されない場合だけ、
 * ::beforeで「関連記事」を補完する。
 */
.single-post .sidebar .widget_related_entries .widget-title {
  margin: 0 0 13px !important;
  padding: 0 0 8px !important;
  background: transparent !important;
  color: var(--ms-navy) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ms-border) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
  letter-spacing: 0.07em;
}

.single-post .sidebar .widget_related_entries .widget-title::before,
.single-post .sidebar .widget_related_entries .widget-title::after {
  content: none !important;
  display: none !important;
}

.single-post .sidebar .widget_related_entries:not(:has(.widget-title))::before {
  content: "関連記事";
  display: block;
  margin: 0 0 13px;
  padding: 0 0 8px;
  color: var(--ms-navy);
  border-bottom: 1px solid var(--ms-border);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-link {
  display: block !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--ms-text) !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-thumb {
  flex: 0 0 96px;
  width: 96px;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-content {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-title {
  margin: 0;
  color: var(--ms-text) !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-link:hover,
.single-post .sidebar .widget_related_entries .widget-related-entry-card-link:focus-visible {
  background: transparent !important;
  color: var(--ms-bluegray) !important;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-link:hover
  .widget-related-entry-card-title,
.single-post .sidebar .widget_related_entries .widget-related-entry-card-link:focus-visible
  .widget-related-entry-card-title {
  color: var(--ms-bluegray) !important;
}

.single-post .sidebar .widget_related_entries .widget-related-entry-card-link:last-child {
  margin-bottom: 0 !important;
}

.single-post .ms-sidebar-about .ms-sidebar-policy-link,
.single-post .ms-sidebar-about .ms-sidebar-disclosure {
  margin: 7px 0 0;
  line-height: 1.6;
}

.single-post .ms-sidebar-about .ms-sidebar-disclosure {
  margin-top: 6px;
}

.single-post .ms-sidebar-about .ms-sidebar-policy-link a,
.single-post .ms-sidebar-about .ms-sidebar-disclosure a {
  color: var(--ms-bluegray);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.single-post .ms-sidebar-about .ms-sidebar-policy-link a:hover,
.single-post .ms-sidebar-about .ms-sidebar-disclosure a:hover {
  color: var(--ms-navy);
}

.single-post .sns-share {
  margin-top: 26px !important;
  margin-bottom: 24px !important;
}

.single-post .sns-share-message {
  margin-bottom: 8px !important;
  color: var(--ms-warmgray);
  font-size: 12px !important;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.single-post .sns-share .sns-share-buttons,
.single-post .sns-share .sns-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.single-post .sns-share .sns-button {
  flex: 0 1 112px !important;
  width: auto !important;
  min-width: 96px;
  min-height: 34px;
  margin: 0 !important;
  padding: 0 11px !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  line-height: 1.25;
}

.single-post .sns-share .sns-button .button-caption,
.single-post .sns-share .sns-button .social-icon,
.single-post .sns-share .sns-button .social-icon + span {
  font-size: 12px !important;
}

/* ==================================================
   6A. Post navigation / 同じテーマの記事
   Cocoon pager-post-naviを、同一テーマ内の読了後導線として整える。
   ※同一カテゴリー限定の可否自体はCocoon設定側で制御する。
   ================================================== */
.single-post .pager-post-navi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  width: 100%;
  margin: 34px 0 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.single-post .pager-post-navi::before {
  content: "同じテーマの記事";
  grid-column: 1 / -1;
  display: block;
  margin: 0;
  padding: 0 0 8px;
  color: var(--ms-navy);
  border-bottom: 1px solid var(--ms-border);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.single-post .pager-post-navi > a.a-wrap {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  margin: 0 !important;
  padding: 8px 0 !important;
  background: transparent !important;
  color: var(--ms-text) !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  box-sizing: border-box;
}

.single-post .pager-post-navi > a.prev-post {
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 12px;
  padding-left: 16px !important;
}

.single-post .pager-post-navi > a.next-post {
  grid-template-columns: minmax(0, 1fr) 96px;
  column-gap: 12px;
  padding-right: 16px !important;
}

.single-post .pager-post-navi .prev-post-thumb,
.single-post .pager-post-navi .next-post-thumb {
  width: 96px;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ms-soft-blue);
}

.single-post .pager-post-navi .prev-post-thumb {
  grid-column: 1;
  grid-row: 1;
}

.single-post .pager-post-navi .next-post-thumb {
  grid-column: 2;
  grid-row: 1;
}

.single-post .pager-post-navi .prev-post-thumb img,
.single-post .pager-post-navi .next-post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.single-post .pager-post-navi .prev-post-title,
.single-post .pager-post-navi .next-post-title {
  min-width: 0;
  margin: 0;
  color: var(--ms-text);
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.single-post .pager-post-navi .prev-post-title {
  grid-column: 2;
  grid-row: 1;
}

.single-post .pager-post-navi .next-post-title {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}

.single-post .pager-post-navi .iconfont {
  position: absolute;
  top: 50%;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  color: var(--ms-border-strong);
  background: transparent;
  font-size: 13px;
  line-height: 1;
  transform: translateY(-50%);
}

.single-post .pager-post-navi .prev-post .iconfont {
  left: 0;
}

.single-post .pager-post-navi .next-post .iconfont {
  right: 0;
}

.single-post .pager-post-navi > a.a-wrap:hover,
.single-post .pager-post-navi > a.a-wrap:focus-visible {
  background: transparent !important;
  color: var(--ms-bluegray) !important;
}

.single-post .pager-post-navi > a.a-wrap:hover .prev-post-title,
.single-post .pager-post-navi > a.a-wrap:hover .next-post-title,
.single-post .pager-post-navi > a.a-wrap:focus-visible .prev-post-title,
.single-post .pager-post-navi > a.a-wrap:focus-visible .next-post-title {
  color: var(--ms-bluegray);
}

.single-post .pager-post-navi > a.a-wrap:focus-visible {
  outline: 2px solid rgba(95, 118, 133, 0.28);
  outline-offset: 3px;
}

/* ==================================================
   7. Desktop
   ================================================== */
@media screen and (min-width: 1024px) {
  /*
   * ABOUTは通常サイドバー、関連記事はCocoon標準の
   * 「サイドバースクロール追従」エリアを利用する。
   * 独自stickyや#sidebar-scroll自体の位置調整は行わず、
   * Cocoon標準の追従挙動をそのまま使う。
   * 追従時の見た目の上余白は、関連記事ウィジェット内部のpaddingで確保する。
   */
  .single-post .sidebar {
    align-self: stretch;
    padding-top: 43px;
    background: transparent;
  }

  .single-post #sidebar-scroll .widget_related_entries {
    padding-top: 32px !important;
  }

  /*
   * PCは追従関連記事を主導線とするため、
   * 本文末の同カテゴリ前後記事ナビは重複導線として非表示。
   * 1023px以下ではサイドバー自体を非表示にしているため、前後記事ナビを残す。
   */
  .single-post .pager-post-navi {
    display: none;
  }

  .single-post .entry-title {
    margin-bottom: 10px;
  }

  .single-post .date-tags {
    margin-bottom: 18px;
  }

  .single-post .sidebar .widget {
    margin-bottom: 28px;
  }

  .single-post .ms-sidebar-about p {
    line-height: 1.68;
  }

  .single-post .entry-content .wp-block-table,
  .single-post .entry-content .ms-table-wide {
    max-width: 100%;
    overflow-x: visible;
  }

  .single-post .entry-content .wp-block-table table,
  .single-post .entry-content > table,
  .single-post .entry-content .ms-table-wide table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
  }

  .single-post .entry-content .wp-block-table th,
  .single-post .entry-content .wp-block-table td,
  .single-post .entry-content > table th,
  .single-post .entry-content > table td,
  .single-post .entry-content .ms-table-wide th,
  .single-post .entry-content .ms-table-wide td {
    padding: 9px 8px;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .single-post .entry-content .ms-table-wide th:first-child,
  .single-post .entry-content .ms-table-wide td:first-child {
    width: 78px;
  }
}

/* ==================================================
   8. Tablet / mobile shell
   ================================================== */
@media screen and (max-width: 1023px) {
  .single-post .entry-content {
    --ms-article-indent: 12px;
    --ms-article-subindent: 24px;
  }

  .single-post .content-in {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: var(--ms-gutter-mobile);
    padding-right: var(--ms-gutter-mobile);
    box-sizing: border-box;
  }

  .single-post .main {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .single-post .sidebar {
    display: none !important;
  }

  .single-post .entry-content,
  .single-post .entry-content p,
  .single-post .entry-content li {
    font-size: 16px;
  }

  .single-post .entry-content h2 {
    margin-top: 36px;
    margin-bottom: 16px;
    padding: 9px 12px 10px 13px;
    border-left-width: 4px !important;
    font-size: 22px;
  }

  .single-post .entry-content h3 {
    margin-top: 23px;
    margin-bottom: 9px;
    padding: 2px 2px 3px;
    font-size: 17.5px;
  }

  .single-post .entry-content .ms-article-research {
    margin-top: 22px;
    margin-bottom: 28px;
    padding: 14px 14px 14px 15px;
  }

  .single-post .ms-shirube-box {
    padding: 15px 15px 16px 16px;
    border-left-width: 3px;
  }

  .single-post .ms-shirube-box .ms-shirube-step-body {
    padding-left: 4.5em;
  }

  .single-post .entry-content .ms-article-mobile-meta {
    display: block;
    margin: -14px 0 30px;
    padding: 0 2px;
    color: var(--ms-warmgray);
    font-size: 12px !important;
    line-height: 1.70;
    font-weight: 400;
  }

  .single-post .entry-content .ms-article-mobile-meta p,
  .single-post .entry-content .ms-article-mobile-meta > .wp-block-group__inner-container > p {
    margin: 0;
    color: inherit;
    font-size: inherit !important;
    line-height: inherit;
    font-weight: inherit;
  }

  .single-post .entry-content .ms-article-mobile-meta a {
    color: var(--ms-bluegray);
    font-size: inherit !important;
    line-height: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  .single-post .entry-content .ms-article-mobile-meta a:hover,
  .single-post .entry-content .ms-article-mobile-meta a:focus-visible {
    color: var(--ms-navy);
  }

  .single-post .entry-content .wp-block-table,
  .single-post .entry-content .ms-table-wide {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .single-post .entry-content .ms-table-wide table {
    width: 760px !important;
    min-width: 760px !important;
    table-layout: auto;
  }

  .single-post .sns-share .sns-button {
    flex-basis: 104px !important;
    min-width: 88px;
  }
}

@media screen and (max-width: 834px) {
  .single-post .entry-content .ms-article-points,
  .single-post .entry-content .wp-block-group.ms-article-research,
  .single-post .entry-content .wp-block-group.ms-shirube-box {
    margin-left: 8px;
    margin-right: 8px;
  }

  .single-post .entry-content .ms-article-points {
    padding: 0.95rem 1rem;
  }

  .single-post .entry-content .ms-article-points ul {
    padding-left: 1.2em;
  }
}

/* ==================================================
   9. Mobile final
   ================================================== */
@media screen and (max-width: 680px) {
  .single-post .entry-content {
    --ms-article-indent: 8px;
    --ms-article-subindent: 16px;
  }

  .single-post .entry-title {
    margin-bottom: 10px !important;
    font-size: 26px !important;
    line-height: 1.42 !important;
  }

  .single-post .date-tags {
    margin-bottom: 18px !important;
    font-size: 11.5px !important;
  }

  .single-post .entry-content,
  .single-post .entry-content p,
  .single-post .entry-content li {
    font-size: 15.5px !important;
    line-height: 1.80 !important;
  }

  .single-post .entry-content p {
    margin-bottom: 14px !important;
  }

  .single-post .entry-content h2 {
    margin-top: 34px !important;
    margin-bottom: 13px !important;
    padding: 9px 11px 9px 12px;
    border-left-width: 4px !important;
    font-size: 21px !important;
    line-height: 1.48 !important;
  }

  .single-post .entry-content h3 {
    margin-top: 22px !important;
    margin-bottom: 6px !important;
    font-size: 17px !important;
  }

  /* Mobileでは共通編集グリッドを!important化して本文幅を確保。 */
  .single-post .entry-content > h2 ~ :is(
    p,
    h3,
    ul,
    ol,
    blockquote,
    .wp-block-table,
    .wp-block-group,
    .wp-block-image,
    figure
  ) {
    margin-left: var(--ms-article-indent) !important;
  }

  .single-post .entry-content > h2 ~ :is(
    h3,
    ul,
    ol,
    blockquote,
    .wp-block-table,
    .wp-block-group,
    .wp-block-image,
    figure
  ) {
    width: calc(100% - var(--ms-article-indent)) !important;
    max-width: calc(100% - var(--ms-article-indent)) !important;
  }

  .single-post .entry-content > h3
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
  .single-post .entry-content > h3
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
  .single-post .entry-content > h3
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
  .single-post .entry-content > h3
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure),
  .single-post .entry-content > h3
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure)
  + :is(p, ul, ol, blockquote, .wp-block-table, .wp-block-image, figure) {
    margin-left: var(--ms-article-subindent) !important;
    width: calc(100% - var(--ms-article-subindent)) !important;
    max-width: calc(100% - var(--ms-article-subindent)) !important;
  }

  .single-post .entry-content h3.wp-block-heading {
    display: block !important;
    width: max-content !important;
    max-width: calc(100% - 30px) !important;
    position: relative;
    isolation: isolate;
    padding: 2px 2px 3px;
  }

  .single-post .entry-content h3.wp-block-heading::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    left: -1px;
    bottom: 6px;
    width: calc(100% + 18px);
    height: 7px;
    background: var(--ms-h3-marker);
    border-radius: 999px;
    z-index: -1;
    pointer-events: none;
  }

  .single-post .entry-content ul,
  .single-post .entry-content ol {
    margin-top: 8px;
    margin-bottom: 16px;
    padding-left: 1.45em;
  }

  .single-post .entry-content li + li {
    margin-top: 3px;
  }

  .single-post .entry-content .ms-article-research {
    margin-top: 22px !important;
    margin-bottom: 28px !important;
    padding: 14px 0 14px 14px !important;
  }

  .single-post .entry-content .ms-article-research > p,
  .single-post .entry-content .ms-article-research > .wp-block-group__inner-container > p {
    font-size: 14px !important;
    line-height: 1.74 !important;
  }

  .single-post .entry-content .ms-article-research > p:first-child,
  .single-post .entry-content .ms-article-research > .wp-block-group__inner-container > p:first-child {
    font-size: 14px !important;
  }

  .single-post .entry-content .ms-table-example-note {
    font-size: 12px;
  }

  .single-post .entry-content .ms-article-mobile-meta {
    margin-top: -12px;
    margin-bottom: 27px;
  }

  .single-post .entry-content .ms-article-mobile-meta p,
  .single-post .entry-content .ms-article-mobile-meta > .wp-block-group__inner-container > p,
  .single-post .entry-content .ms-article-mobile-meta a {
    font-size: inherit !important;
  }

  /* 同じテーマの記事: smartphone */
  .single-post .pager-post-navi {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 30px;
  }

  .single-post .pager-post-navi::before {
    grid-column: 1;
    margin-bottom: 2px;
  }

  .single-post .pager-post-navi > a.prev-post,
  .single-post .pager-post-navi > a.next-post {
    grid-template-columns: 84px minmax(0, 1fr);
    min-height: 68px;
    column-gap: 11px;
    padding: 8px 14px 8px 14px !important;
  }

  .single-post .pager-post-navi .prev-post-thumb,
  .single-post .pager-post-navi .next-post-thumb {
    grid-column: 1;
    grid-row: 1;
    width: 84px;
  }

  .single-post .pager-post-navi .prev-post-title,
  .single-post .pager-post-navi .next-post-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
  }

  .single-post .pager-post-navi .prev-post .iconfont {
    left: 0;
  }

  .single-post .pager-post-navi .next-post .iconfont {
    right: 0;
  }

  .single-post .sns-share {
    margin-top: 24px !important;
    margin-bottom: 22px !important;
  }

  .single-post .sns-share .sns-share-buttons,
  .single-post .sns-share .sns-buttons {
    gap: 6px;
  }

  .single-post .sns-share .sns-button {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0;
    min-height: 34px;
  }
}

@media screen and (max-width: 600px) {
  .single-post .wp-block-table th,
  .single-post .wp-block-table td,
  .single-post .entry-content > table th,
  .single-post .entry-content > table td {
    padding: 9px 10px;
    font-size: 14px;
  }
}

/* ==========================================================
   Normal post: mobile/tablet affiliate policy link
   PC (1024px+) uses the existing sidebar notice.
   ========================================================== */

.single-post .ms-mobile-affiliate-note {
  display: none;
}

@media screen and (max-width: 1023px) {
  .single-post .ms-mobile-affiliate-note {
    display: block;
    margin: 0 0 1.4rem;
    color: #5F7685;
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .single-post .ms-mobile-affiliate-note a {
    color: #5F7685;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
  }
}

