/* =========================================================
  Design Palette Article Page
  - PC:  1200px〜  （ヘッダー・フッターと統一）
  - TAB: 680px〜1199px（上限を1199pxに拡張）
  - SP:  〜679px  （SPデザイン維持のため変更なし）
========================================================= */

/* =========================
  1. Base
========================= */

* {
  box-sizing: border-box;
}

body {
  min-width: 375px;
}

.article-page {
  min-width: var(--sp-min-width);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Noto Sans JP", sans-serif;
}

.article-page a {
  color: inherit;
  text-decoration: none;
}

.article-page button {
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.article-page img {
  display: block;
  max-width: 100%;
}

:root {
  --color-text: #222222;
  --color-text-sub: #666666;
  --color-sub: #666666;
  --color-bg: #f7f7f7;
  --color-white: #ffffff;
  --color-line: #dddddd;
  --color-link: #1b1c80;
  --color-emphasis: #ffd900;
  --color-placeholder-bg: #f7f7f7;
  --color-footer-placeholder-bg: #dddddd;
  --color-placeholder-text: #ffffff;
  --color-character-bg: #f7f7f7;
  --color-bubble-bg: #f7f7f7;
  --transition-default: 0.2s ease;
  --sp-min-width: 375px;
}

.article-page__panel {
  margin-inline: auto;
  background: var(--color-white);
  /*
    【横スクロール防止】
    パネル幅が viewport を超えないよう max-width: 100% を追加。
    PC/TABの固定幅指定と組み合わせることで安全に動作する。
  */
  max-width: 100%;
}

.article-page__inner {
  margin-inline: auto;
}

/* =========================
  2. Article Header
========================= */

.article-breadcrumb {
  display: flex;
  align-items: center;
  color: var(--color-text);
  font-size: var(--breadcrumb-font-size);
  font-weight: 700;
  line-height: 1.4;
}

.article-breadcrumb__link {
  transition: opacity var(--transition-default);
}

.article-breadcrumb__link:hover {
  opacity: 0.7;
}

.article-breadcrumb__arrow {
  width: 10px;
  height: 10px;
  margin-inline: 8px;
  object-fit: contain;
}

.article-header__title {
  margin: 16px 0 0;
  color: var(--color-text);
  font-size: var(--article-title-font-size);
  font-weight: 700;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  align-items: center;
  column-gap: var(--article-meta-gap);
  margin-top: var(--article-title-bottom-space);
  font-size: var(--article-meta-font-size);
  line-height: 1.4;
}

.article-meta__item--published {
  color: var(--color-text);
}

.article-meta__item--updated {
  color: var(--color-text-sub);
}

.article-eyecatch {
  display: grid;
  place-items: center;
  width: 100%;
  height: var(--article-eyecatch-height);
  margin-top: var(--article-eyecatch-top-space);
  overflow: hidden;
  border-radius: var(--article-eyecatch-radius);
  background: var(--color-placeholder-bg);
}

.article-eyecatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-eyecatch__placeholder {
  color: var(--color-placeholder-text);
  font-size: var(--article-eyecatch-placeholder-size);
  font-weight: 700;
  line-height: 1;
}

.article-lead {
  margin-top: var(--article-eyecatch-bottom-space);
  margin-bottom: var(--article-lead-bottom-space);
}

.article-lead p {
  margin: 0;
  color: var(--color-text);
  font-size: var(--article-body-font-size);
  font-weight: 400;
  line-height: 1.8;
  white-space: pre-line;
}

/* =========================
  3. Point Box
========================= */

.article-point-box {
  display: flex;
  width: 100%;
  margin: var(--point-box-outer-space) 0;
}

.article-point-box__character {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.article-point-box__character-image {
  display: grid;
  place-items: center;
  width: var(--character-image-size);
  height: var(--character-image-size);
  overflow: hidden;
  border-radius: 50%;
  background: var(--color-character-bg);
}

.article-point-box__character-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-point-box__character-name {
  margin: 8px 0 0;
  color: var(--color-text);
  font-size: var(--character-name-size);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.article-point-box__bubble-wrap {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
  line-height: 0;
}

.article-point-box__tail {
  display: block;
  flex: 0 0 auto;
  max-width: none;
  margin: 0;
  padding: 0;
  line-height: 0;
  object-fit: fill;
  vertical-align: bottom;
}

.article-point-box__tail--top {
  display: none;
}

.article-point-box__bubble {
  flex: 0 0 var(--bubble-width);
  width: var(--bubble-width);
  min-height: var(--bubble-min-height);
  padding: var(--bubble-padding-y) var(--bubble-padding-x);
  border: none;
  border-radius: 8px;
  background: var(--color-bubble-bg);
}

.article-point-box__heading {
  margin: 0 0 var(--point-heading-bottom);
  color: var(--color-text);
  font-size: var(--point-heading-size);
  font-weight: 700;
  line-height: 1.3;
}

.article-point-box__list {
  display: flex;
  flex-direction: column;
  gap: var(--point-list-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-point-box__item {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  color: var(--color-text);
  font-size: var(--point-text-size);
  font-weight: 400;
  line-height: 1.3;
}

.article-point-box__dot {
  width: 4px;
  height: 4px;
  margin-top: calc((var(--point-text-size) * 1.3 - 4px) / 2);
  border-radius: 50%;
  background: var(--color-text);
}

.article-point-box__text {
  min-width: 0;
}

/* =========================
  4. TOC
========================= */

.article-toc[hidden] {
  display: none;
}

.article-toc {
  width: var(--toc-width);
  /*
    【横スクロール防止】
    toc-width が親の inner 幅を超えても横はみ出しが起きないよう max-width: 100% を追加。
  */
  max-width: 100%;
  margin: var(--toc-outer-space) auto;
  padding-top: var(--toc-head-space);
  padding-bottom: var(--toc-head-space);
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-bg);
}

.article-toc__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--toc-body-width);
  margin-inline: auto;
}

.article-toc__title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--color-text);
  font-size: var(--toc-title-size);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.article-toc__toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--toc-toggle-width);
  height: var(--toc-toggle-height);
  border-radius: 999px;
  background: var(--color-text);
  color: var(--color-white);
  font-size: var(--toc-toggle-font-size);
  font-weight: 700;
  line-height: 1.2;
  transform: translateY(-50%);
  transition: opacity var(--transition-default), transform var(--transition-default);
}

.article-toc__toggle:hover {
  opacity: 0.85;
  transform: translateY(calc(-50% - 1px));
}

.article-toc__toggle-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: var(--toc-toggle-icon-size);
  height: var(--toc-toggle-icon-size);
  margin-right: 12px;
  border-top: var(--toc-toggle-icon-border) solid var(--color-white);
  border-left: var(--toc-toggle-icon-border) solid var(--color-white);
  transform: translateY(2px) rotate(45deg);
  transition: transform var(--transition-default);
}

.article-toc.is-closed .article-toc__toggle-icon {
  transform: translateY(-2px) rotate(225deg);
}

.article-toc__body {
  width: var(--toc-body-width);
  margin: var(--toc-body-top-space) auto 0;
  padding: 16px var(--toc-body-padding-x);
  border-radius: 8px;
  background: var(--color-white);
}

.article-toc__list,
.article-toc__sub-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc__item {
  padding-bottom: 16px;
}

.article-toc__item + .article-toc__item {
  padding-top: 16px;
  border-top: 1px solid var(--color-line);
}

.article-toc__link {
  display: grid;
  align-items: center;
  color: inherit;
  transition: opacity var(--transition-default);
}

.article-toc__link:hover {
  opacity: 0.7;
}

.article-toc__link--h2 {
  grid-template-columns: auto minmax(0, var(--toc-h2-text-width));
  column-gap: 8px;
  color: var(--color-text);
  font-size: var(--toc-h2-size);
  font-weight: 700;
  line-height: 1.3;
}

.article-toc__number {
  white-space: nowrap;
}

.article-toc__text {
  min-width: 0;
}

.article-toc__sub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  margin-left: 24px;
}

.article-toc__link--h3 {
  grid-template-columns: 4px minmax(0, var(--toc-h3-text-width));
  column-gap: var(--toc-h3-gap);
  color: var(--color-sub);
  font-size: var(--toc-h3-size);
  font-weight: 700;
  line-height: 1.3;
}

.article-toc__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-sub);
}

/* =========================
  5. Article Content
========================= */

.article-content {
  color: var(--color-text);
}

.article-content p {
  margin: 0 0 var(--article-p-space);
  color: var(--color-text);
  font-size: var(--article-body-size);
  font-weight: 400;
  line-height: 1.8;
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  color: var(--color-text);
  font-weight: 700;
}

.article-content h2 {
  margin-top: var(--article-h2-top);
  font-size: var(--article-h2-size);
  line-height: 1.4;
}

.article-content h2::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 8px;
  margin-bottom: 16px;
  background: var(--color-text);
}

.article-content h3 {
  margin-top: var(--article-h3-top);
  margin-bottom: var(--article-h3-bottom);
  font-size: var(--article-h3-size);
  line-height: 1.5;
}

.article-content h4 {
  margin-top: var(--article-h4-top);
  margin-bottom: var(--article-h4-bottom);
  font-size: var(--article-h4-size);
  line-height: 1.6;
}

.article-content a {
  color: var(--color-link);
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-content mark {
  padding: 0 0.02em;
  background: linear-gradient(transparent 58%, var(--color-emphasis) 58%);
  color: inherit;
  font-weight: 700;
}

.article-image {
  width: 100%;
  margin: var(--article-image-space) 0;
}

.article-content p + .article-image {
  margin-top: 0;
}

.article-image__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: var(--article-image-height);
  overflow: hidden;
  border-radius: var(--article-image-radius);
  background: var(--color-placeholder-bg);
  color: var(--color-placeholder-text);
  font-size: var(--article-image-placeholder-size);
  font-weight: 700;
  line-height: 1;
}

.article-list-box {
  width: 100%;
  margin: 16px 0;
  border: 1px solid var(--color-text);
  border-radius: var(--article-list-radius);
  background: var(--color-white);
}

.article-list-box__list {
  margin: 0;
  padding: var(--article-list-padding-y) var(--article-list-padding-x);
  list-style: none;
}

.article-list-box__item {
  position: relative;
  display: grid;
  grid-template-columns: var(--article-list-icon-size) 1fr;
  column-gap: 8px;
  align-items: start;
  font-size: var(--article-list-font-size);
  line-height: 1.8;
}

.article-list-box__item + .article-list-box__item {
  margin-top: 33px;
}

.article-list-box__item + .article-list-box__item::before {
  content: "";
  position: absolute;
  top: -17px;
  left: 0;
  width: 100%;
  border-top: 1px dashed var(--color-sub);
}

.article-list-box__icon,
.article-list-box__number {
  display: inline-grid;
  place-items: center;
  width: var(--article-list-icon-size);
  height: var(--article-list-icon-size);
  margin-top: calc((var(--article-list-font-size) * 1.8 - var(--article-list-icon-size)) / 2);
}

.article-list-box__icon::before {
  content: "";
  display: block;
  width: var(--article-list-icon-size);
  height: var(--article-list-icon-size);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.article-list-box--check .article-list-box__icon::before {
  background-image: url("../images/icon_list_check.svg");
}

.article-list-box--dot .article-list-box__icon::before {
  background-image: url("../images/icon_list_dot.svg");
}

.article-list-box--number .article-list-box__list {
  counter-reset: article-list-number;
}

.article-list-box--number .article-list-box__item {
  counter-increment: article-list-number;
}

.article-list-box__number::before {
  content: counter(article-list-number);
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-white);
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
}

.article-list-box__text {
  min-width: 0;
}

/* =========================
  6. Tags / Share
========================= */

.article-share-section,
.article-prev-next,
.article-related {
  margin-inline: auto;
  background: var(--color-white);
  /*
    【横スクロール防止】
    panel と同様に max-width: 100% で viewport 超えを防ぐ。
  */
  max-width: 100%;
}

.article-share-section__inner,
.article-prev-next__inner,
.article-related__inner {
  margin-inline: auto;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tag-gap-y) var(--tag-gap-x);
}

.article-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: var(--tag-font-size);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: opacity var(--transition-default);
}

.article-tag:hover {
  opacity: 0.75;
}

.article-tag--primary {
  border: 1px solid var(--color-text);
  background: var(--color-text);
  color: var(--color-white);
}

.article-tag--outline {
  border: 1px solid var(--color-text);
  background: var(--color-white);
  color: var(--color-text);
}

.article-share {
  display: grid;
  grid-template-columns: repeat(6, var(--share-button-width));
  gap: var(--share-row-gap) var(--share-column-gap);
  margin-top: var(--share-top-space);
}

.article-share__button {
  display: grid;
  place-items: center;
  width: var(--share-button-width);
  height: var(--share-button-height);
  overflow: hidden;
  border-radius: var(--share-button-radius);
  transition:
    opacity var(--transition-default),
    transform var(--transition-default);
}

.article-share__button:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.article-share__button.is-copied {
  opacity: 0.65;
}

.article-share__button--line { background: #05b84d; }
.article-share__button--x { background: #000000; }
.article-share__button--facebook { background: #166fe5; }
.article-share__button--pinterest { background: #c7001e; }
.article-share__button--pocket { background: #d93a50; }
.article-share__button--link { background: #555555; }

.article-share__icon {
  width: var(--share-icon-width);
  height: auto;
  object-fit: contain;
}

/* =========================
  7. Previous / Next
========================= */

.article-prev-next__inner {
  display: grid;
  align-items: center;
}

.article-prev-next__divider {
  background: var(--color-line);
}

.article-nav-card {
  display: grid;
  color: var(--color-text);
}

.article-nav-card--empty {
  visibility: hidden;
}

.article-nav-card:hover .article-nav-card__title {
  text-decoration-color: currentColor;
}

.article-nav-card:hover .article-nav-card__thumb {
  opacity: 0.9;
  transform: translateY(-2px);
}

.article-nav-card__label-area {
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-nav-card__label {
  color: var(--color-text);
  font-size: var(--nav-label-size);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.article-nav-card__arrow {
  display: block;
  flex: 0 0 auto;
  width: var(--nav-arrow-size);
  height: var(--nav-arrow-size);
  border-top: var(--nav-arrow-stroke) solid var(--color-text);
  border-right: var(--nav-arrow-stroke) solid var(--color-text);
}

.article-nav-card__arrow--prev { transform: rotate(-135deg); }
.article-nav-card__arrow--next { transform: rotate(45deg); }

.article-nav-card__thumb {
  display: grid;
  place-items: center;
  width: var(--nav-thumb-width);
  height: var(--nav-thumb-height);
  overflow: hidden;
  border-radius: var(--nav-thumb-radius);
  background: var(--color-footer-placeholder-bg);
  transition:
    opacity var(--transition-default),
    transform var(--transition-default);
}

.article-nav-card__thumb img,
.related-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-nav-card__placeholder {
  color: var(--color-placeholder-text);
  font-size: var(--nav-placeholder-size);
  font-weight: 700;
  line-height: 1;
}

.article-nav-card__title {
  display: -webkit-box;
  -webkit-line-clamp: var(--nav-title-lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: var(--nav-title-width);
  margin: 0;
  color: var(--color-text);
  font-size: var(--nav-title-size);
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition-default);
}

/* =========================
  8. Related
========================= */

.article-related__title {
  margin: 0;
  color: var(--color-text);
  font-size: var(--related-heading-size);
  font-weight: 700;
  line-height: 1.4;
}

.article-related__grid {
  display: grid;
  margin-top: var(--related-heading-bottom-space);
}

.related-card__link {
  display: block;
}

.related-card__thumb {
  display: grid;
  place-items: center;
  width: 100%;
  height: var(--related-thumb-height);
  overflow: hidden;
  border-radius: var(--related-thumb-radius);
  background: var(--color-footer-placeholder-bg);
  box-shadow: var(--related-thumb-shadow);
  transition:
    opacity var(--transition-default),
    transform var(--transition-default);
}

.related-card__link:hover .related-card__thumb {
  opacity: 0.9;
  transform: translateY(-2px);
}

.related-card__placeholder {
  color: var(--color-placeholder-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.related-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.5em;
  margin: 8px 0 0;
  color: var(--color-text);
  font-size: var(--related-title-size);
  font-weight: 700;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition-default);
}

.related-card__link:hover .related-card__title {
  text-decoration-color: currentColor;
}

.more-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--more-button-width);
  height: var(--more-button-height);
  margin-inline: auto;
  border-radius: var(--more-button-radius);
  background: var(--color-text);
  color: var(--color-white);
  font-size: var(--more-button-font-size);
  font-weight: 700;
  line-height: 1;
  transition:
    opacity var(--transition-default),
    transform var(--transition-default);
}

.more-button:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.more-button__icon {
  position: absolute;
  top: 50%;
  right: var(--more-button-icon-right);
  width: 9px;
  height: 14px;
  transform: translateY(-50%);
  object-fit: contain;
}

/* =========================
  9. PC
  【変更】min-width: 1024px → 1200px（ヘッダーと統一）
  panel: 1200px だが、1024px〜1199px では viewport を超えていたため修正。
========================= */

@media (min-width: 1200px) {
  .article-page {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .article-page__panel {
    width: 1200px;
    /* max-width: 100% は common 側で追加済み */
  }

  .article-page__inner {
    width: 960px;
    padding-top: 64px;
    padding-bottom: 0;

    --breadcrumb-font-size: 16px;
    --article-title-font-size: 40px;
    --article-title-bottom-space: 24px;
    --article-meta-font-size: 16px;
    --article-meta-gap: 24px;
    --article-eyecatch-height: 503px;
    --article-eyecatch-top-space: 40px;
    --article-eyecatch-bottom-space: 48px;
    --article-eyecatch-radius: 16px;
    --article-eyecatch-placeholder-size: 48px;
    --article-body-font-size: 18px;
    --article-lead-bottom-space: 48px;
  }

  .article-point-box {
    align-items: center;
    justify-content: space-between;

    --point-box-outer-space: 48px;
    --character-image-size: 160px;
    --character-name-size: 16px;
    --bubble-width: 740px;
    --bubble-min-height: 0;
    --bubble-tail-width: 40px;
    --bubble-tail-height: 50px;
    --bubble-padding-x: 32px;
    --bubble-padding-y: 24px;
    --point-heading-size: 18px;
    --point-heading-bottom: 19px;
    --point-text-size: 18px;
    --point-list-gap: 14px;
  }

  .article-point-box__tail--left {
    width: var(--bubble-tail-width);
    height: var(--bubble-tail-height);
  }

  .article-toc {
    --toc-width: 720px;
    --toc-outer-space: 48px;
    --toc-head-space: 22px;
    --toc-title-size: 24px;
    --toc-toggle-width: 120px;
    --toc-toggle-height: 35px;
    --toc-toggle-font-size: 16px;
    --toc-toggle-icon-size: 9px;
    --toc-toggle-icon-border: 2px;
    --toc-body-width: 640px;
    --toc-body-top-space: 22px;
    --toc-body-padding-x: 40px;
    --toc-h2-size: 18px;
    --toc-h2-text-width: 535px;
    --toc-h3-size: 18px;
    --toc-h3-gap: 8px;
    --toc-h3-text-width: 524px;
  }

  .article-toc.is-closed {
    height: 79px;
    padding-bottom: 22px;
  }

  .article-content {
    --article-body-size: 18px;
    --article-p-space: 24px;
    --article-h2-size: 32px;
    --article-h2-top: 64px;
    --article-h3-size: 24px;
    --article-h3-top: 48px;
    --article-h3-bottom: 16px;
    --article-h4-size: 20px;
    --article-h4-top: 48px;
    --article-h4-bottom: 8px;
    --article-image-space: 16px;
    --article-image-radius: 12px;
    --article-image-placeholder-size: 40px;
    --article-list-radius: 12px;
    --article-list-icon-size: 18px;
    --article-list-font-size: 18px;
    --article-list-padding-x: 40px;
    --article-list-padding-y: 40px;
  }

  .article-image--large { --article-image-height: 500px; }
  .article-image--medium { --article-image-height: 400px; }
  .article-image--small { --article-image-height: 280px; }

  .article-share-section,
  .article-prev-next,
  .article-related {
    width: 1200px;
    /* max-width: 100% は common 側で追加済み */
  }

  .article-share-section__inner,
  .article-prev-next__inner,
  .article-related__inner {
    width: 960px;
  }

  .article-share-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .article-share-section__inner {
    --tag-font-size: 16px;
    --tag-gap-x: 16px;
    --tag-gap-y: 16px;
    --share-top-space: 32px;
    --share-button-width: 130px;
    --share-button-height: 48px;
    --share-icon-width: 32px;
    --share-column-gap: 32px;
    --share-row-gap: 16px;
    --share-button-radius: 4px;
  }

  .article-prev-next {
    margin-top: 64px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .article-prev-next__inner {
    grid-template-columns: 400px 1px 400px;
    justify-content: space-between;
  }

  .article-prev-next__divider {
    width: 1px;
    height: 235px;
  }

  .article-nav-card {
    width: 400px;

    --nav-label-size: 20px;
    --nav-arrow-size: 20px;
    --nav-arrow-stroke: 5px;
    --nav-title-width: 400px;
    --nav-title-size: 20px;
    --nav-title-lines: 2;
    --nav-thumb-width: 280px;
    --nav-thumb-height: 147px;
    --nav-thumb-radius: 8px;
    --nav-placeholder-size: 20px;
  }

  .article-nav-card--prev {
    grid-template-columns: 80px 280px;
    grid-template-areas:
      "label thumb"
      "title title";
    column-gap: 40px;
    row-gap: 24px;
  }

  .article-nav-card--next {
    grid-template-columns: 280px 80px;
    grid-template-areas:
      "thumb label"
      "title title";
    column-gap: 40px;
    row-gap: 24px;
  }

  .article-nav-card__label-area {
    grid-area: label;
    align-self: center;
    flex-direction: column;
    gap: 16px;
  }

  .article-nav-card--prev .article-nav-card__label-area { flex-direction: column-reverse; }
  .article-nav-card--next .article-nav-card__label-area { flex-direction: column; }

  .article-nav-card__thumb { grid-area: thumb; }
  .article-nav-card__title { grid-area: title; }

  .article-related {
    margin-top: 64px;
  }

  .article-related__inner {
    padding-top: 64px;
    padding-bottom: 64px;

    --related-heading-size: 32px;
    --related-heading-bottom-space: 24px;
    --related-thumb-height: 157px;
    --related-thumb-radius: 8px;
    --related-thumb-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
    --related-title-size: 20px;

    --more-button-width: 280px;
    --more-button-height: 60px;
    --more-button-radius: 12px;
    --more-button-font-size: 20px;
    --more-button-icon-right: 16px;
  }

  .article-related__grid {
    grid-template-columns: repeat(3, 300px);
    gap: 24px 30px;
  }

  .more-button {
    margin-top: 40px;
  }
}

/* =========================
  10. Tablet
  【変更】max-width: 1023px → 1199px（ヘッダーと統一）
  【変更】panel: 768px → min(768px, 100%)（680px〜767px での overflow 解消）
  【変更】inner: 680px → min(680px, calc(100% - 40px))（fluid化）
========================= */

@media (min-width: 680px) and (max-width: 1199px) {
  .article-page {
    padding-top: 40px;
    padding-bottom: 80px;
  }

  .article-page__panel {
    /*
      768px より viewport が狭い場合（680px〜767px）は 100% に縮む。
      768px 以上では 768px に固定。
    */
    width: min(768px, 100%);
  }

  .article-page__inner {
    /*
      680px より viewport 幅が狭い場合は左右 20px の余白を確保しつつ縮む。
      overflow-x: clip で子要素のはみ出しも吸収。
    */
    width: min(680px, calc(100% - 40px));
    overflow-x: clip;
    padding-top: 48px;
    padding-bottom: 0;

    --breadcrumb-font-size: 14px;
    --article-title-font-size: 32px;
    --article-title-bottom-space: 24px;
    --article-meta-font-size: 14px;
    --article-meta-gap: 24px;
    --article-eyecatch-height: 356px;
    --article-eyecatch-top-space: 40px;
    --article-eyecatch-bottom-space: 40px;
    --article-eyecatch-radius: 12px;
    --article-eyecatch-placeholder-size: 40px;
    --article-body-font-size: 16px;
    --article-lead-bottom-space: 40px;
  }

  .article-point-box {
    align-items: center;
    justify-content: space-between;

    --point-box-outer-space: 40px;
    --character-image-size: 110px;
    --character-name-size: 14px;
    --bubble-width: 523px;
    --bubble-min-height: 0;
    --bubble-tail-width: 32px;
    --bubble-tail-height: 40px;
    --bubble-padding-x: 24px;
    --bubble-padding-y: 24px;
    --point-heading-size: 16px;
    --point-heading-bottom: 14px;
    --point-text-size: 16px;
    --point-list-gap: 10px;
  }

  .article-point-box__tail--left {
    width: var(--bubble-tail-width);
    height: var(--bubble-tail-height);
  }

  .article-toc {
    --toc-width: 680px;
    --toc-outer-space: 40px;
    --toc-head-space: 21px;
    --toc-title-size: 22px;
    --toc-toggle-width: 120px;
    --toc-toggle-height: 35px;
    --toc-toggle-font-size: 16px;
    --toc-toggle-icon-size: 9px;
    --toc-toggle-icon-border: 2px;
    --toc-body-width: 600px;
    --toc-body-top-space: 21px;
    --toc-body-padding-x: 40px;
    --toc-h2-size: 16px;
    --toc-h2-text-width: 497px;
    --toc-h3-size: 16px;
    --toc-h3-gap: 8px;
    --toc-h3-text-width: 484px;
  }

  .article-toc.is-closed {
    height: 77px;
    padding-bottom: 21px;
  }

  .article-content {
    --article-body-size: 16px;
    --article-p-space: 24px;
    --article-h2-size: 28px;
    --article-h2-top: 48px;
    --article-h3-size: 22px;
    --article-h3-top: 40px;
    --article-h3-bottom: 12px;
    --article-h4-size: 20px;
    --article-h4-top: 40px;
    --article-h4-bottom: 8px;
    --article-image-space: 16px;
    --article-image-radius: 10px;
    --article-image-placeholder-size: 32px;
    --article-list-radius: 10px;
    --article-list-icon-size: 16px;
    --article-list-font-size: 16px;
    --article-list-padding-x: 40px;
    --article-list-padding-y: 40px;
  }

  .article-image--large { --article-image-height: 354px; }
  .article-image--medium { --article-image-height: 283px; }
  .article-image--small { --article-image-height: 198px; }

  .article-share-section,
  .article-prev-next,
  .article-related {
    width: min(768px, 100%);
    overflow-x: clip;
  }

  .article-share-section__inner,
  .article-prev-next__inner,
  .article-related__inner {
    width: min(680px, calc(100% - 40px));
  }

  .article-share-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .article-share-section__inner {
    --tag-font-size: 15px;
    --tag-gap-x: 16px;
    --tag-gap-y: 16px;
    --share-top-space: 32px;
    --share-button-width: 100px;
    --share-button-height: 48px;
    --share-icon-width: 32px;
    --share-column-gap: 16px;
    --share-row-gap: 16px;
    --share-button-radius: 4px;
  }

  .article-prev-next {
    margin-top: 48px;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .article-prev-next__inner {
    grid-template-columns: 328px 1px 328px;
    justify-content: space-between;
  }

  .article-prev-next__divider {
    width: 1px;
    height: 220px;
  }

  .article-nav-card {
    width: 328px;

    --nav-label-size: 16px;
    --nav-arrow-size: 13px;
    --nav-arrow-stroke: 4px;
    --nav-title-width: 240px;
    --nav-title-size: 16px;
    --nav-title-lines: 3;
    --nav-thumb-width: 240px;
    --nav-thumb-height: 126px;
    --nav-thumb-radius: 8px;
    --nav-placeholder-size: 18px;
  }

  .article-nav-card--prev {
    grid-template-columns: 56px 240px;
    grid-template-areas:
      "label thumb"
      "label title";
    column-gap: 32px;
    row-gap: 16px;
  }

  .article-nav-card--next {
    grid-template-columns: 240px 56px;
    grid-template-areas:
      "thumb label"
      "title label";
    column-gap: 32px;
    row-gap: 16px;
  }

  .article-nav-card__label-area {
    grid-area: label;
    align-self: center;
    flex-direction: column;
    gap: 12px;
  }

  .article-nav-card--prev .article-nav-card__label-area { flex-direction: column-reverse; }
  .article-nav-card--next .article-nav-card__label-area { flex-direction: column; }

  .article-nav-card__thumb { grid-area: thumb; }

  .article-nav-card__title {
    grid-area: title;
    width: 240px;
  }

  .article-related {
    margin-top: 48px;
  }

  .article-related__inner {
    padding-top: 48px;
    padding-bottom: 48px;

    --related-heading-size: 28px;
    --related-heading-bottom-space: 24px;
    --related-thumb-height: 173px;
    --related-thumb-radius: 10px;
    --related-thumb-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
    --related-title-size: 20px;

    --more-button-width: 330px;
    --more-button-height: 60px;
    --more-button-radius: 12px;
    --more-button-font-size: 20px;
    --more-button-icon-right: 24px;
  }

  .article-related__grid {
    grid-template-columns: repeat(2, 330px);
    gap: 24px 20px;
  }

  .more-button {
    margin-top: 32px;
  }
}

/* =========================
  11. SP
  【変更なし】max-width: 679px のまま維持
  SP デザインは 375px〜679px で安定して動作するため変更しない。
  ヘッダーの SP（〜480px）とは範囲が異なるが、
  481px〜679px ではこの SP スタイルが適用され横スクロールは発生しない。
========================= */

@media (max-width: 679px) {
  .article-page {
    padding-top: 20px;
    padding-bottom: 80px;
  }

  .article-page__panel {
    width: 375px;
    /* max-width: 100% は common 側で追加済み */
  }

  .article-page__inner {
    width: 335px;
    padding-top: 40px;
    padding-bottom: 0;

    --breadcrumb-font-size: 12px;
    --article-title-font-size: 28px;
    --article-title-bottom-space: 20px;
    --article-meta-font-size: 12px;
    --article-meta-gap: 20px;
    --article-eyecatch-height: 176px;
    --article-eyecatch-top-space: 32px;
    --article-eyecatch-bottom-space: 32px;
    --article-eyecatch-radius: 10px;
    --article-eyecatch-placeholder-size: 24px;
    --article-body-font-size: 16px;
    --article-lead-bottom-space: 32px;
  }

  .article-breadcrumb__arrow {
    width: 8px;
    height: 8px;
  }

  .article-point-box {
    flex-direction: column;
    align-items: center;

    --point-box-outer-space: 32px;
    --character-image-size: 80px;
    --character-name-size: 14px;
    --bubble-width: 335px;
    --bubble-min-height: 0;
    --bubble-tail-width: 50px;
    --bubble-tail-height: 32px;
    --bubble-padding-x: 20px;
    --bubble-padding-y: 24px;
    --point-heading-size: 16px;
    --point-heading-bottom: 16px;
    --point-text-size: 16px;
    --point-list-gap: 12px;
  }

  .article-point-box__character {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }

  .article-point-box__character-name {
    margin: 0;
    text-align: left;
  }

  .article-point-box__bubble-wrap {
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    gap: 0;
  }

  .article-point-box__tail--left { display: none; }

  .article-point-box__tail--top {
    display: block;
    width: var(--bubble-tail-width);
    height: var(--bubble-tail-height);
  }

  .article-point-box__bubble {
    flex-basis: auto;
    margin-top: 0;
    padding-bottom: 24px;
  }

  .article-toc {
    --toc-width: 335px;
    --toc-outer-space: 32px;
    --toc-head-space: 20px;
    --toc-title-size: 20px;
    --toc-toggle-width: 112px;
    --toc-toggle-height: 33px;
    --toc-toggle-font-size: 14px;
    --toc-toggle-icon-size: 8px;
    --toc-toggle-icon-border: 2px;
    --toc-body-width: 295px;
    --toc-body-top-space: 20px;
    --toc-body-padding-x: 20px;
    --toc-h2-size: 14px;
    --toc-h2-text-width: 234px;
    --toc-h3-size: 14px;
    --toc-h3-gap: 4px;
    --toc-h3-text-width: 231px;
  }

  .article-toc__head {
    justify-content: flex-start;
  }

  .article-toc__title {
    margin-left: 20px;
  }

  .article-toc.is-closed {
    height: 73px;
    padding-bottom: 20px;
  }

  .article-content {
    --article-body-size: 16px;
    --article-p-space: 20px;
    --article-h2-size: 24px;
    --article-h2-top: 40px;
    --article-h3-size: 20px;
    --article-h3-top: 32px;
    --article-h3-bottom: 12px;
    --article-h4-size: 18px;
    --article-h4-top: 32px;
    --article-h4-bottom: 8px;
    --article-image-space: 16px;
    --article-image-radius: 8px;
    --article-image-placeholder-size: 24px;
    --article-list-radius: 8px;
    --article-list-icon-size: 14px;
    --article-list-font-size: 14px;
    --article-list-padding-x: 16px;
    --article-list-padding-y: 24px;
  }

  .article-image--large { --article-image-height: 174px; }
  .article-image--medium { --article-image-height: 140px; }
  .article-image--small { --article-image-height: 98px; }

  .article-share-section,
  .article-prev-next,
  .article-related {
    width: 375px;
  }

  .article-share-section__inner,
  .article-prev-next__inner,
  .article-related__inner {
    width: 335px;
  }

  .article-share-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .article-share-section__inner {
    --tag-font-size: 14px;
    --tag-gap-x: 12px;
    --tag-gap-y: 12px;
    --share-top-space: 24px;
    --share-button-width: 101px;
    --share-button-height: 32px;
    --share-icon-width: 22px;
    --share-column-gap: 16px;
    --share-row-gap: 16px;
    --share-button-radius: 4px;
  }

  .article-share {
    grid-template-columns: repeat(3, var(--share-button-width));
  }

  .article-prev-next {
    margin-top: 40px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .article-prev-next__inner {
    grid-template-columns: 335px;
    row-gap: 24px;
  }

  .article-prev-next__divider {
    width: 335px;
    height: 1px;
  }

  .article-nav-card {
    width: 335px;

    --nav-label-size: 14px;
    --nav-arrow-size: 12px;
    --nav-arrow-stroke: 4px;
    --nav-title-width: 198px;
    --nav-title-size: 14px;
    --nav-title-lines: 3;
    --nav-thumb-width: 130px;
    --nav-thumb-height: 68px;
    --nav-thumb-radius: 4px;
    --nav-placeholder-size: 12px;
  }

  .article-nav-card__label-area {
    flex-direction: row;
    column-gap: 16px;
  }

  .article-nav-card--prev .article-nav-card__label-area,
  .article-nav-card--next .article-nav-card__label-area {
    flex-direction: row;
  }

  .article-nav-card--prev {
    grid-template-columns: 130px 7px 198px;
    grid-template-areas:
      "label label label"
      "thumb gap title";
    row-gap: 16px;
  }

  .article-nav-card--prev .article-nav-card__label-area {
    grid-area: label;
    justify-self: start;
  }

  .article-nav-card--next {
    grid-template-columns: 198px 7px 130px;
    grid-template-areas:
      "title gap thumb"
      "label label label";
    row-gap: 16px;
  }

  .article-nav-card--next .article-nav-card__label-area {
    grid-area: label;
    justify-self: end;
  }

  .article-nav-card__thumb { grid-area: thumb; }
  .article-nav-card__title { grid-area: title; align-self: start; }

  .article-related {
    margin-top: 40px;
  }

  .article-related__inner {
    padding-top: 40px;
    padding-bottom: 40px;

    --related-heading-size: 24px;
    --related-heading-bottom-space: 16px;
    --related-thumb-height: 176px;
    --related-thumb-radius: 10px;
    --related-thumb-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
    --related-title-size: 18px;

    --more-button-width: 335px;
    --more-button-height: 48px;
    --more-button-radius: 10px;
    --more-button-font-size: 16px;
    --more-button-icon-right: 24px;
  }

  .article-related__grid {
    grid-template-columns: 335px;
    row-gap: 16px;
  }

  .more-button {
    margin-top: 24px;
  }
}


/* =========================================================
  Article Page Fix
  - SWELL interference adjustment
========================================================= */

/* =========================
  1. SWELL標準目次を非表示
========================= */

.article-content .p-toc,
.article-content .c-toc,
.article-content .toc,
.article-content .toc_container,
.article-content #toc_container,
.article-content .swell-block-toc,
.article-content .wp-block-swell-toc,
.article-content [class*="toc"] {
  display: none !important;
}

.article-page .article-toc {
  display: block;
}

.article-page .article-toc[hidden] {
  display: none;
}

/* =========================
  2. 目次開閉ボタンの背景を強制
========================= */

.article-page .article-toc__toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--toc-toggle-width);
  height: var(--toc-toggle-height);
  border: none !important;
  border-radius: 999px !important;
  background: #222222 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  box-shadow: none !important;
  appearance: none;
}

.article-page .article-toc__toggle-text {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.article-page .article-toc__toggle-icon {
  border-color: #ffffff !important;
}

/* =========================
  3. タグ文字色の強制
========================= */

.article-page .article-tag {
  text-decoration: none !important;
}

.article-page .article-tag--primary,
.article-page .article-tag--primary:visited,
.article-page .article-tag--primary:hover {
  border-color: #222222 !important;
  background: #222222 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.article-page .article-tag--outline,
.article-page .article-tag--outline:visited,
.article-page .article-tag--outline:hover {
  border-color: #222222 !important;
  background: #ffffff !important;
  color: #222222 !important;
  -webkit-text-fill-color: #222222;
}

/* =========================================================
  Article Share Button Fix
========================================================= */

.article-page .article-share__button {
  display: grid !important;
  place-items: center;
  width: var(--share-button-width) !important;
  height: var(--share-button-height) !important;
  border: none !important;
  border-radius: var(--share-button-radius) !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
}

.article-page .article-share__button--line { background: #05b84d !important; }
.article-page .article-share__button--x { background: #000000 !important; }
.article-page .article-share__button--facebook { background: #166fe5 !important; }
.article-page .article-share__button--pinterest { background: #c7001e !important; }
.article-page .article-share__button--pocket { background: #d93a50 !important; }
.article-page .article-share__button--link { background: #555555 !important; }

.article-page .article-share__icon {
  display: block !important;
  width: var(--share-icon-width) !important;
  height: auto !important;
  max-width: none !important;
  object-fit: contain;
}

/* =========================================================
  Article Point Box Tail Fix
========================================================= */

.article-page .article-point-box__tail--left {
  display: block !important;
}

.article-page .article-point-box__tail--top {
  display: none !important;
}

@media (max-width: 679px) {
  .article-page .article-point-box__tail--left {
    display: none !important;
  }

  .article-page .article-point-box__tail--top {
    display: block !important;
    width: var(--bubble-tail-width) !important;
    height: var(--bubble-tail-height) !important;
  }
}

/* =========================================================
  Article Anchor Position Fix
  【変更】ブレイクポイントを PC/TAB/SP に合わせて更新
  - PC (1200px+): ヘッダー最大 124px + 余白 → 160px
  - TAB (680px-1199px): ヘッダー最大 84px + 余白 → 120px
  - SP (679px-): ヘッダー最大 74px + 余白 → 100px
========================================================= */

.article-content h2,
.article-content h3 {
  scroll-margin-top: 160px !important;
}

body.admin-bar .article-content h2,
body.admin-bar .article-content h3 {
  scroll-margin-top: 192px !important;
}

/* TAB: 680px〜1199px */
@media (min-width: 680px) and (max-width: 1199px) {
  .article-content h2,
  .article-content h3 {
    scroll-margin-top: 120px !important;
  }

  body.admin-bar .article-content h2,
  body.admin-bar .article-content h3 {
    scroll-margin-top: 152px !important;
  }
}

/* SP: 679px以下 */
@media (max-width: 679px) {
  .article-content h2,
  .article-content h3 {
    scroll-margin-top: 100px !important;
  }

  body.admin-bar .article-content h2,
  body.admin-bar .article-content h3 {
    scroll-margin-top: 132px !important;
  }
}
