/* Site CSS */

/* -------------------------------------------------------------------------- */
/* Issue（theme.json styles.css より複製）                                        */
/* -------------------------------------------------------------------------- */

/* ==================================================
   ISSUE PAGE / WEB MAGAZINE Issueページ
================================================== */

.issue-page {
  --wp--style--block-gap: 0 !important;
}

/* ==================================================
   Issue Cover タイトル
================================================== */

.issue-title {
  max-width: var(--wp--style--global--content-size) !important;
  margin: 37px auto 60px !important;
  text-align: center !important;
}

.issue-title > * {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.issue-title h1 {
  font-size: 50px !important;
  line-height: 1 !important;
  margin: 0 0 20px !important;
}

.issue-label {
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  opacity: 0.6 !important;
  margin: 0 0 12px !important;
}

.issue-date {
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  opacity: 0.7 !important;
  margin: 14px 0 0 !important;
}

.issue-title .issue-label,
.issue-title .issue-date {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

.issue-cover .wp-block-post-title,
.issue-cover .wp-block-post-title a {
  font-size: 15px !important;
  line-height: 1.3 !important;
  margin: 0 0 35px !important;
}

/* Issue-cover template main FI uses Article first-view rules (.post-template-issue-cover).
 * Keep these for in-content / legacy .issue-cover cards only — not the template-stage FI. */
.issue-cover .wp-block-post-featured-image:not(.is-portrait):not(.is-landscape) {
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-bottom: 0 !important;
}

.issue-cover .wp-block-post-featured-image:not(.is-portrait):not(.is-landscape) img {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  display: block;
}

.issue-lead {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: 20px !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  font-weight: 700 !important;
}

.issue-writers {
  font-size: 18px !important;
  line-height: 1.8 !important;
  font-weight: 400 !important;
  margin-bottom: 50px !important;
}

/* ==================================================
   Issue 今月の投稿者目次
================================================== */

.issue-contributors {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  margin: 0 0 12px !important;
  flex-wrap: nowrap !important;
  --wp--style--block-gap: 0 !important;
}

.issue-contributors .wp-block-post-author-name {
  font-size: 18px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.issue-contributors .wp-block-post-author-name::after {
  content: "｜";
  display: inline-block;
  margin: 0 .18em;
  font-weight: 400 !important;
  opacity: 0.65;
}

.issue-contributors .mfb-column-title {
  font-size: 15px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  margin: 0 !important;
}

.issue-contributors .issue-contributor-number {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 0 0 .5em !important;
  padding: 0 !important;
}

.issue-contributors #issue-contributor-number {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 0 0 .5em !important;
  padding: 0 !important;
}

.issue-contributors #issue-contributor-number .value {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 2.1em !important;
  height: 2.1em !important;
  min-width: 2.1em !important;

  border: 1px solid rgba(0,0,0,.22) !important;
  border-radius: 50% !important;

  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;

  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {

  .issue-contributors {
    display: grid !important;
    grid-template-columns: auto auto 1fr !important;
    column-gap: 0 !important;
    row-gap: 2px !important;
    align-items: center !important;
  }

  .issue-contributors .wp-block-post-author-name {
    grid-column: 1 !important;
    grid-row: 1 !important;
    white-space: nowrap !important;
  }

  .issue-contributors .mfb-column-title {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    margin-top: 2px !important;
  }

  .issue-contributors #issue-contributor-number {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin-left: .5em !important;
  }

  .issue-contributors .wp-block-post-author-name::after {
    content: "" !important;
    margin: 0 !important;
  }

}

.issue-column-meta {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

.issue-column-number,
.issue-column-number * {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 2.2em !important;
  height: 2.2em !important;
  min-width: 2.2em !important;

  border: 1px solid rgba(0,0,0,.22) !important;
  border-radius: 50% !important;

  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;

  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.issue-column-title,
.issue-column-title * {
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.issue-article-title .wp-block-post-title,
.issue-article-title .wp-block-post-title a {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  font-size: 24px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  margin: 8px 0 15px !important;
}

.issue-article-block .wp-block-post-featured-image img {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 8px !important;
}

.issue-profile {
  display: flex !important;
  gap: 18px !important;
  align-items: flex-start !important;
  margin-top: 35px !important;
}

/* cover_image のMFBブロックに直接 issue-profile-image を付ける */

.issue-profile-image {
  flex: 0 0 120px !important;
  width: 120px !important;
  height: 120px !important;
  overflow: hidden !important;
  margin: 0 !important;
}

.issue-profile-image img {
  width: 120px !important;
  height: 120px !important;
  object-fit: cover !important;
  display: block !important;
}

.issue-profile-text {
  flex: 1 1 auto !important;
  margin: 0 !important;
}

.issue-profile-text .wp-block-post-author-name {
  font-size: 20px !important;
  line-height: 1.45 !important;
  font-weight: 700 !important;
  margin: 0 0 15px !important;
}

.issue-profile-text .wp-block-post-author-biography {
  font-size: 15px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
  margin: 0 !important;
}

.issue-profile-text {
  flex: 1 1 auto !important;
  margin: 0 !important;
  gap: 0 !important;
  row-gap: 0 !important;
  --wp--style--block-gap: 0px !important;
}

.issue-profile {
  margin-bottom: 0 !important;
}

.issue-profile-text .wp-block-post-author-name {
  font-size: 20px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  margin-top: 0 !important;
  margin-bottom: 5px !important;
}

.issue-profile-text .wp-block-post-author-biography {
  font-size: 15px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.issue-profile-text .wp-block-post-author-name a,
.issue-profile-text .wp-block-post-author-name a:hover,
.issue-profile-text .wp-block-post-author-name a:focus {
  text-decoration: none !important;
  color: inherit !important;
}

/* Article プロフィール: Contributors と同じ .contributor-sns を流用、bio 下に余白のみ */
.issue-profile-text .contributor-sns {
  margin-top: 8px !important;
}

.issue-articles .wp-block-post-template > li {
  border-bottom: 1px solid rgba(0,0,0,.18) !important;
  padding-bottom: 20px !important;
  margin-bottom: 20px !important;
}

.issue-articles .wp-block-post-template > li:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* ==================================================
   Issue記事一覧｜続きを読むボタン
================================================== */

.issue-articles .wp-block-post-excerpt__more-link {
  display: inline-block !important;

  margin-top: 0 !important;
  padding: 5px 14px !important;

  border: 1px solid rgba(0,0,0,.22) !important;
  border-radius: 999px !important;

  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;

  text-decoration: none !important;
  color: inherit !important;
}

.issue-articles .wp-block-post-excerpt__more-link:hover {
  opacity: 0.65;
}

/* ==================================================
   Issue個別記事｜投稿者メタ
================================================== */

.issue-post-meta {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 0 !important;
  flex-wrap: wrap !important;
  margin: 0 0 18px !important;
  --wp--style--block-gap: 0 !important;
}

.issue-post-meta > * {
  margin: 0 !important;
}

.issue-post-meta > *:nth-child(1) {
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  margin-right: 0 !important;
}

.issue-post-meta .wp-block-post-author-name,
.issue-post-meta > *:nth-child(2) {
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  margin-left: 0 !important;
}

.issue-post-meta .wp-block-post-author-name a {
  text-decoration: none !important;
}

.issue-post-meta .wp-block-post-date,
.issue-post-meta > *:nth-child(3) {
  margin-left: auto !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
  opacity: 0.7;
}

/* ==================================================
   Issue一覧｜文・写真｜投稿者｜日付
   Issueページ内だけに限定
================================================== */

.issue-page .issue-list-author-meta {
  display: flex !important;
  align-items: baseline !important;
  gap: 0 !important;
  width: min(var(--wp--style--global--content-size), calc(100vw - 48px)) !important;
  margin: 0 auto 16px !important;
  --wp--style--block-gap: 0 !important;
}

.issue-page .issue-list-author-meta > * {
  margin: 0 !important;
}

.issue-page .issue-list-author-meta > *:nth-child(1) {
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  margin-right: 0 !important;
}

.issue-page .issue-list-author-meta .wp-block-post-author-name,
.issue-page .issue-list-author-meta > *:nth-child(2) {
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  margin-left: 0 !important;
}

.issue-page .issue-list-author-meta .wp-block-post-author-name a {
  text-decoration: none !important;
}

.issue-page .issue-list-author-meta .wp-block-post-date,
.issue-page .issue-list-author-meta > *:nth-child(3) {
  margin-left: auto !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  opacity: 0.7;
}

/* ==================================================
   Issue個別記事｜アイキャッチ上ラベル
================================================== */

.issue-featured-wrap {
  position: relative !important;
  margin: 0 auto 40px !important;
  max-width: var(--wp--style--global--content-size) !important;
}

.issue-featured-wrap .wp-block-post-featured-image {
  margin: 0 !important;
}

.issue-featured-wrap .entry-label {
  position: absolute !important;
  top: -16px !important;
  left: 10px !important;
  z-index: 5 !important;

  display: inline-block !important;
  margin: 0 !important;
  padding: 10px 16px !important;

  background: #fff !important;
  border: 1px solid rgba(0,0,0,.22) !important;
  border-radius: 999px !important;

  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/*
 * SP: align entry-label with logo / content left edge.
 * - Guttered FI (wrap already ≈ content column): left 0 → same as wrap/content start.
 * - Full-bleed landscape FI: left 20px (= root padding spacing-30 / logo).
 * PC keeps left: 10px above.
 */
@media (max-width: 768px) {
  .issue-featured-wrap .entry-label {
    left: 0 !important;
  }

  .article-template .article-featured.issue-featured-wrap:has(.is-landscape) .entry-label {
    left: var(--wp--preset--spacing--30) !important; /* 20px */
  }
}

/* ==================================================
   Issue個別記事｜文・写真｜投稿者｜日付
================================================== */

.issue-page .issue-post-meta {
  display: flex !important;
  align-items: baseline !important;
  gap: 0 !important;
  width: min(var(--wp--style--global--content-size), calc(100vw - 48px)) !important;
  margin: 0 auto 18px !important;
  --wp--style--block-gap: 0 !important;
}

.issue-page .issue-post-meta > * {
  margin: 0 !important;
}

.issue-page .issue-post-meta > *:nth-child(1) {
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
}

.issue-page .issue-post-meta .wp-block-post-author-name,
.issue-page .issue-post-meta > *:nth-child(2) {
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
}

.issue-page .issue-post-meta .wp-block-post-author-name a {
  text-decoration: none !important;
  font-weight: 700 !important;
}

.issue-page .issue-post-meta .wp-block-post-date,
.issue-page .issue-post-meta > *:nth-child(3) {
  margin-left: auto !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
  opacity: 0.7;
}

/* ==================================================
   Issue個別記事｜文・写真｜投稿者｜日付 PC位置補正
================================================== */

@media (min-width: 769px) {
  .issue-post-meta {
    display: flex !important;
    align-items: baseline !important;
    gap: 0 !important;

    width: min(var(--wp--style--global--content-size), calc(100vw - 48px)) !important;
    max-width: none !important;

    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    margin-top: 0 !important;
    margin-bottom: 18px !important;

    --wp--style--block-gap: 0 !important;
  }

  .issue-post-meta > * {
    margin: 0 !important;
  }

  .issue-post-meta > *:nth-child(1) {
    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
  }

  .issue-post-meta .wp-block-post-author-name,
  .issue-post-meta > *:nth-child(2) {
    font-size: 18px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
  }

  .issue-post-meta .wp-block-post-author-name a {
    text-decoration: none !important;
    font-weight: 700 !important;
  }

  .issue-post-meta .wp-block-post-date,
  .issue-post-meta > *:nth-child(3) {
    margin-left: auto !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    opacity: 0.7;
  }
}

/* ==================================================
   Top page｜NEW ISSUE
================================================== */

.issue-update-block {
  margin: 30px auto 56px !important;
  padding: 28px 1px !important;
  border: 1px solid rgba(0,0,0,.18) !important;
  border-radius: 60px !important;
  text-align: center !important;
}

.issue-update-title span {
  display: block;
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  opacity: 0.6 !important;
  margin: 0 0 8px !important;
}

.issue-update-block h2,
.issue-update-title {
  font-size: 24px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-align: center !important;
  margin: 0 0 24px !important;
}

.issue-update-contributors .wp-block-post-template {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 1px !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

.issue-update-contributors .wp-block-post-template > li {
  width: 65px !important;
  flex: 0 0 65px !important;
  display: flex !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.issue-update-contributor {
  width: 75px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  --wp--style--block-gap: 0 !important;
}

.issue-update-contributor .wp-block-avatar {
  width: 60px !important;
  height: 60px !important;
  margin: 0 auto !important;
  line-height: 0 !important;
}

.issue-update-contributor img {
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}

.issue-update-contributor .wp-block-post-author-name {
  width: 100% !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  text-align: center !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

/* ==================================================
   Top page｜NEW ISSUE 下部リンク
================================================== */

.issue-update-block {
  position: relative !important;
  overflow: visible !important;
  padding-bottom: 20px !important;
}

.issue-update-link {
  position: absolute !important;
  left: 50% !important;
  bottom: -18px !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
}

.issue-update-link .wp-block-button__link {
  display: inline-block !important;
  margin: 0 !important;
  padding: 5px 14px !important;

  background: #fff !important;
  border: 1px solid rgba(0,0,0,.22) !important;
  border-radius: 999px !important;

  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  text-decoration: none !important;
  color: inherit !important;
  white-space: nowrap !important;
}

.issue-update-link .wp-block-button__link:hover {
  opacity: 0.65;
}

/* -------------------------------------------------------------------------- */
/* Top Hero（theme.json styles.css より複製）                                    */
/* -------------------------------------------------------------------------- */

/* jp-title → components.css（content-body 見出しと隔離） */

/* -------------------------------------------------------------------------- */
/* Podcast 入口（page-id-23）ヒーロー直下：番組ロゴ＋ステートメント              */
/* 対象: ヒーロー直後 group のみ（他 .jp-title / 画像へ波及させない）            */
/* PC/Tablet: ヒーロー→ロゴ広げ / ロゴ拡大 / ロゴ→Listen 詰め                   */
/* Mobile ≤767: ヒーロー→ロゴ 50 / ロゴ160維持 / ロゴ→Listen 40                 */
/* -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* blockGap 1.8rem（≈29px）を上書き。ロゴ幅は inline 160px のまま触らない */
  body.page-id-23 .content-body > .hero-carousel + .wp-block-group {
    margin-block-start: 50px !important;
    margin-top: 50px !important;
  }

  /* 共通 .jp-title margin-top:55px（実測≈64）→ 実測≈40 に。bottom は共通のまま */
  body.page-id-23 .content-body > .hero-carousel + .wp-block-group > .jp-title {
    margin-top: 32px !important;
  }
}

@media (min-width: 768px) {
  body.page-id-23 .content-body > .hero-carousel + .wp-block-group {
    margin-block-start: 84px !important;
    margin-top: 84px !important;
  }

  body.page-id-23 .content-body > .hero-carousel + .wp-block-group > .wp-block-image.is-portrait img,
  body.page-id-23 .content-body > .hero-carousel + .wp-block-group > .wp-block-image img {
    width: 180px !important;
    max-width: 180px !important;
    height: auto !important;
  }

  /* 共通 .jp-title の margin-top を詰めてロゴ＋コピーを一まとまりに */
  body.page-id-23 .content-body > .hero-carousel + .wp-block-group > .jp-title {
    margin-top: 56px !important;
  }
}

@media (min-width: 1025px) {
  body.page-id-23 .content-body > .hero-carousel + .wp-block-group {
    margin-block-start: 92px !important;
    margin-top: 92px !important;
  }

  body.page-id-23 .content-body > .hero-carousel + .wp-block-group > .wp-block-image.is-portrait img,
  body.page-id-23 .content-body > .hero-carousel + .wp-block-group > .wp-block-image img {
    width: 192px !important; /* 160 × 1.2 */
    max-width: 192px !important;
  }

  body.page-id-23 .content-body > .hero-carousel + .wp-block-group > .jp-title {
    margin-top: 60px !important;
  }
}

@media (max-width: 768px) {

  .hero-carousel {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .hero-carousel .wp-block-post-template {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    width: max-content !important;
    margin: 0 !important;
    padding: 0 10px !important;
  }

  .hero-carousel .wp-block-post-template > * {
    flex: 0 0 92vw !important;
    width: 92vw !important;
    scroll-snap-align: start;
    margin: 0 !important;
  }

  .hero-carousel img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
    display: block;
  }

  .hero-carousel .wp-block-post-title {
    font-size: 20px !important;
    line-height: 1.5 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    text-align: justify !important;
    text-justify: inter-character;
    line-break: loose;
    word-break: normal;
    overflow-wrap: normal;
    text-wrap: auto;
  }

  .hero-carousel .trails-card-meta {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
  }

  /* ヒーローメタの見た目は components.css .trails-card-meta に統一 */

}

/* ==================================================
   Top Hero｜SPは1:1／PC（769+）は960px・3:2
================================================== */

/* SP／共通: トップのみ1:1（一般.hero-carousel は3:2のまま） */
.top-hero.hero-carousel img {
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
}

.top-hero {
  margin-bottom: 0 !important;
}

.top-hero + * {
  margin-top: 24px !important;
}

/* PC: トップヒーロー上余白 = 入口 .page-entrance.page-title の padding-top(72px) */
@media (min-width: 769px) {
  body.home.page-template-page-no-title .content-body > .wp-block-spacer:first-child,
  body.home.page-template-page-no-title .content-body > .wp-block-spacer:has(+ .hero-carousel.top-hero) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  body.home.page-template-page-no-title .hero-carousel.top-hero {
    margin-top: 72px !important;
  }
}

@media (min-width: 769px) {

  /*
   * PC hero breakout (method A): scrollport = viewport width so slide 2 peeks.
   * Slide basis stays 760px. Content column (contentSize 760) is unchanged.
   * Same breakout idea as SP; SP block below remains separate (92vw slides).
   * Side gutters: track padding + scroll-padding (snap would otherwise cancel left pad).
   */
  .hero-carousel {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 40px !important;
    -webkit-overflow-scrolling: touch;
  }

  .hero-carousel .wp-block-post-template {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: max-content !important;
    margin: 0 !important;
    /* Leading/trailing inset for photo + title (PC gutters). */
    padding: 0 40px !important;
    box-sizing: content-box !important;
  }

  .hero-carousel .wp-block-post-template > li,
  .hero-carousel .wp-block-post-template > article,
  .hero-carousel .wp-block-post-template > * {
    flex: 0 0 760px !important;
    width: 760px !important;
    scroll-snap-align: start;
    margin: 0 !important;
  }

  .hero-carousel img {
    width: 100% !important;
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
    display: block;
  }

  /* トップのみ: スライド幅 960px・画像 3:2（余白40px・横スクロールは共通） */
  .hero-carousel.top-hero .wp-block-post-template > li,
  .hero-carousel.top-hero .wp-block-post-template > article,
  .hero-carousel.top-hero .wp-block-post-template > * {
    flex: 0 0 960px !important;
    width: 960px !important;
  }

  .hero-carousel.top-hero img {
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
  }

}

/* ヒーローメタ（.hero-meta 含む）は components.css .trails-card-meta に統一 */

/* -------------------------------------------------------------------------- */
/* Race-1｜タイトル・ヒーロー見出し・アンカー（theme.json styles.css より複製）          */
/* -------------------------------------------------------------------------- */

#updates,
#concept,
#overview,
#course,
#schedule,
#rules,
#guests,
#results,
#gallery,
#field,
#sponsors,
#organizer,
#contact {
  scroll-margin-top: 50px;
}

.race-title {
  text-align: center;
  margin: 72px auto 40px;
}

.race-title h2 {
  font-family: "Century Gothic", sans-serif !important;
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700 !important;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
}

.race-title h3 {
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0 0 12px 0;
}

/*
 * page-race main の上余白。
 * PC（≥1025）: 48px を維持（1440 実測基準）。
 * Tablet / Mobile（〜1024）: 30px — hamburger 安全領域と画面バランス。
 * 48px まで戻さない。Mobile を 15px 台まで詰めない。
 */
body.page-template-page-race main.wp-block-group {
  margin-top: 48px !important;
}

.race-hero {
  text-align: center;
  /* PC: H1 と Race Navigation の分離余白 */
  margin-bottom: 40px !important;
  --wp--style--block-gap: 0px !important;
}

/* Tablet + Mobile（〜1024）— PC 1440 のルールは触らない */
@media (max-width: 1024px) {
  body.page-template-page-race main.wp-block-group {
    margin-top: 30px !important;
  }

  .race-hero {
    /* H1 拡大後も Nav と分離しつつ、PC の 40px ほどは取らない */
    margin-bottom: 24px !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav {
    margin-top: 6px !important;
    margin-bottom: 10px !important;
  }
}

/*
 * ≤768: main 上余白 32px（上端→Catch 維持）。
 * hamburger は Catch より上。H1 に hamburger 回避用の左右56px は付けない。
 */
@media (max-width: 768px) {
  body.page-template-page-race main.wp-block-group {
    margin-top: 32px !important;
  }

  .race-hero {
    margin-bottom: 16px !important;
  }
}

/*
 * Race Hero タイポ（Catch / H1）
 * 狭いほど小さく。PC < Tablet の逆転を作らない。
 * 上書きは下の max-width だけ（calc / 複雑 clamp なし）。
 *
 * Catch: ≥1025→16 / ≤1024→14 / ≤768→13 / ≤480→13
 * H1:    ≥1025→90 / ≤1024→74 / ≤768→58 / ≤480→36（nowrap）
 * （Tablet は旧 15/82・14/64 の約 90%。PC / Mobile≤480 は据え置き）
 */
.race-hero h3 {
  font-family: "Century Gothic", sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  line-height: 1 !important;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0 !important;
}

.race-hero h1 {
  font-family: "Century Gothic", sans-serif !important;
  font-size: 90px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em;
  margin: 0 !important;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 1024px) {
  .race-hero h3 {
    font-size: 14px !important;
  }

  .race-hero h1 {
    font-size: 74px !important;
  }
}

@media (max-width: 768px) {
  .race-hero h3 {
    font-size: 13px !important;
  }

  .race-hero h1 {
    font-size: 58px !important;
  }
}

/* Phone: H1 は 1 行優先（文字数 calc は使わない。固定値のみ） */
@media (max-width: 480px) {
  .race-hero h3 {
    font-size: 13px !important;
  }

  .race-hero h1 {
    font-size: 36px !important;
    white-space: nowrap;
  }
}

/*
 * iPad 縦付近のみ: 読み物帯を ≈688px（左右 ~40px 相当）に締める。
 * global padding / contentSize 760 は変更しない。
 * 対象外: Hero / race-nav / Main Visual / content-slider / Course 画像 等のビジュアル。
 * 1024（760 維持）・390（350 維持）には当てない。
 */
@media (min-width: 700px) and (max-width: 820px) {
  body.page-template-page-race .wp-block-post-content > p,
  body.page-template-page-race .wp-block-post-content > .race-title,
  body.page-template-page-race .wp-block-post-content > .event-info > :where(
    p,
    h4,
    .wp-block-list,
    .wp-block-details,
    .event-info,
    .race-title,
    .info-block,
    .sponsor-end,
    .wp-block-buttons
  ),
  body.page-template-page-race .wp-block-post-content > .event-info > .wp-block-group.has-global-padding:not(
    .content-slider
  ):not(.race-title):not(.info-block),
  /* COURSE ダウンロードナビも読み物帯へ（画像は対象外のまま） */
  body.page-template-page-race .wp-block-post-content > .wp-block-buttons.race-download-nav,
  body.page-template-page-race
    .wp-block-post-content
    > #course
    + .wp-block-image
    + .wp-block-buttons {
    max-width: 688px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    box-sizing: border-box;
  }

  /* Updates の短い event-info 自体も読み物幅へ */
  body.page-template-page-race .wp-block-post-content > .event-info:not(:has(.content-slider)):not(
      :has(.wp-block-image)
    ) {
    max-width: 688px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (min-width: 769px) {

  .race-title {
  text-align: center;
  margin: 120px auto 80px;
}

}

/* Race-1b｜Hero / Race Navigation wide + mobile hamburger */
/* -------------------------------------------------------------------------- */

/*
 * page-race の post-content は alignfull + has-global-padding。
 * 子の contentSize(760px) 制約だけ外し、画面幅（左右 global padding 残し）を使う。
 * 100vw ブレイクアウトは横スクロールの原因になるため使わない。
 * page-race に限らず .race-hero / .race-nav を持つ Race LP 共通。
 */
.wp-block-post-content.is-layout-constrained > .race-hero,
.wp-block-post-content.is-layout-constrained > .wp-block-navigation.race-nav,
.wp-block-post-content > .race-hero,
.wp-block-post-content > .wp-block-navigation.race-nav {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

/* ---- Race Navigation ≥769: 横並び（本文幅と独立） ---- */
@media (min-width: 769px) {

  .wp-block-post-content > .wp-block-navigation.race-nav {
    margin-top: 12px;
    margin-bottom: 12px;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open {
    display: none !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    background-color: transparent !important;
    overflow: visible !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container:not(.is-menu-open)
    .wp-block-navigation__responsive-container-close {
    display: none !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container:not(.is-menu-open)
    .wp-block-navigation__responsive-container-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__container {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    gap: clamp(0.75rem, 1.6vw, 1.75rem) !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation-item {
    flex: 0 0 auto !important;
  }

  /*
   * Nav 文字: Bold。サイズは控えめ（PC ≥ Tablet、8項目1行に余裕）。
   * ≥769: 13〜16px。狭い Tablet が PC より大きくならない。
   */
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation-item__content {
    white-space: nowrap !important;
    font-size: clamp(13px, 1.1vw, 16px) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
  }

}

/* ---- Race Navigation ≤768: 右固定ハンバーガー + 右ドロワー ---- */
@media (max-width: 768px) {

  /* ナビ本体はボタンのみ可視（JS/core は維持） */
  .wp-block-post-content > .wp-block-navigation.race-nav {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    min-height: 0;
  }

  /*
   * Hamburger: drawer と同系（黒 80% 円 + 白線）。
   * opacity は使わず背景 rgba のみ。影は相性悪いので外す。
   */
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open {
    display: flex !important;
    position: fixed !important;
    top: 12px;
    right: 12px;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 100000;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8) !important;
    box-shadow: none !important;
    color: #fff !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open:hover,
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open:focus,
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open:focus-visible {
    background: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    opacity: 1 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open svg {
    width: 22px;
    height: 22px;
    fill: currentColor !important;
    color: #fff !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open svg path {
    fill: currentColor !important;
  }

  body.admin-bar .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container-open {
    top: calc(46px + 12px);
  }

  /* 閉時: 水平バーを隠す */
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  /*
   * 開時: 右上の content 高さパネルのみ（ページ全体 overlay なし）。
   * 背景は panel の rgba 黒。opacity は要素全体にかけない。
   * PC/Tablet（≥769）には当たらない。
   */
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open {
    display: block !important;
    position: fixed !important;
    /* core の inset:0 全画面を打ち消し、右上アンカーに固定 */
    inset: unset !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    width: 80vw !important;
    max-width: 330px !important;
    height: auto !important;
    max-height: none !important;
    z-index: 100001 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
    opacity: 1 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-dialog {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    box-shadow: none !important;
    overflow: visible !important;
    color: #fff !important;
    opacity: 1 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #fff !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close:hover,
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close:focus,
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close:focus-visible {
    color: #fff !important;
    opacity: 1 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close svg {
    fill: currentColor !important;
    color: #fff !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close svg path {
    fill: currentColor !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    /* 上下 28px 揃え。右は Close(44) 分を確保 */
    padding: 28px 52px 28px 28px !important;
    box-sizing: border-box !important;
    color: #fff !important;
    opacity: 1 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item {
    width: 100% !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  /*
   * リンク: 白文字 / 700 / 左揃え。
   * line-height で広げず、上下 padding でタップ領域 ≈48–52px。
   */
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    color: #fff !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-height: 50px !important;
    margin: 0 !important;
    opacity: 1 !important;
  }

  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content:hover,
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content:focus,
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content:focus-visible,
  .wp-block-post-content > .wp-block-navigation.race-nav
    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content:active {
    color: #fff !important;
    opacity: 1 !important;
  }

}

/* Race Nav 全幅: Bold（実体ウェイトがあれば合成ではなくそのフェイス） */
.wp-block-post-content > .wp-block-navigation.race-nav
  .wp-block-navigation-item__content {
  font-weight: 700 !important;
}

/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* Race-2｜情報セクション（theme.json styles.css より複製）                      */
/* -------------------------------------------------------------------------- */

.note-text,
.note-text p,
p.note-text {
  font-size: 0.75em !important;
  line-height: 1.4 !important;
}

.event-info h4 {
  font-size: 16px !important;
  letter-spacing: 0.08em;
  line-height: 1.3 !important;
  font-weight: 700 !important;

  margin: 0 0 8px !important;
  padding-bottom: 6px !important;

  border-bottom: 1px solid #8d7ac8;
}

.event-info h4:not(:first-child) {
  margin-top: 18px !important;
}

.event-info p {
  font-size: 18px !important;
  line-height: 1.55 !important;
  margin: 0 0 6px !important;
}

.event-info h4:not(:first-child) {
  margin-top: 22px !important;
}

/* -------------------------------------------------------------------------- */
/* Race LP｜Accordion（core/accordion ＋ Details 共通）                         */
/*
 * 用途: Rules / Results / Gallery 等の折りたたみ
 * 構造（Accordion）:
 *   .wp-block-accordion > .wp-block-accordion-item
 *     > .wp-block-accordion-heading > button.__toggle
 *         > .__toggle-title  |  .__toggle-icon
 *     > .wp-block-accordion-panel
 * 構造（Details フォールバック）:
 *   .wp-block-details > summary + 本文
 *
 * 原則: 行全体が操作領域 / 上下罫線 / 円形 ＋・− /
 *       背景・角丸カード・影なし / JS 追加なし
 * 通常本文タイポは「Race LP｜通常本文」節で CONCEPT と共有（panel > p のみ）
 */
/* -------------------------------------------------------------------------- */

body.page-template-page-race {
  --race-accordion-rule: color-mix(in srgb, currentColor 14%, transparent);
  --race-accordion-toggle-size: 38px;
  --race-accordion-pad-y: 22px;
}

@media (max-width: 767px) {
  body.page-template-page-race {
    --race-accordion-toggle-size: 36px;
    --race-accordion-pad-y: 20px;
  }
}

/* --- core/accordion-item: 罫線（隣接で二重にならない） --- */
body.page-template-page-race .wp-block-accordion-item {
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--race-accordion-rule);
  margin: 0;
}

body.page-template-page-race .wp-block-accordion-item:first-child {
  border-top: 1px solid var(--race-accordion-rule);
}

/* --- 見出し行（操作領域 = button 全幅） --- */
body.page-template-page-race .wp-block-accordion-heading {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

body.page-template-page-race .wp-block-accordion-heading__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  padding-block: var(--race-accordion-pad-y);
  padding-inline: 0;
  margin: 0;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
  /* 十分なタップ高さ（円 36–38 + 上下余白） */
  min-height: calc(var(--race-accordion-toggle-size) + var(--race-accordion-pad-y) * 2);
}

/* core の hover 下線は「Web UI的」になりすぎるため外す */
body.page-template-page-race
  .wp-block-accordion-heading__toggle:hover
  .wp-block-accordion-heading__toggle-title {
  text-decoration: none;
}

body.page-template-page-race .wp-block-accordion-heading__toggle-title {
  flex: 1 1 auto;
  min-width: 0;
  /* 見出し size / weight はブロック・theme 継承を維持 */
  text-align: left;
}

/*
 * トグル: 円形アウトライン + ＋ / −
 * core は is-open で rotate(45deg) → × に見えるため無効化し、文字で − を表示
 */
body.page-template-page-race .wp-block-accordion-heading__toggle-icon {
  position: relative;
  flex: 0 0 var(--race-accordion-toggle-size);
  width: var(--race-accordion-toggle-size);
  height: var(--race-accordion-toggle-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent);
  border-radius: 100%;
  background: transparent;
  box-shadow: none;
  color: inherit;
  line-height: 1;
  font-size: 0; /* 実体テキスト(+)を隠し ::before で描画 */
  transform: none;
  transition: none;
}

body.page-template-page-race
  .wp-block-accordion-item.is-open
  > .wp-block-accordion-heading
  .wp-block-accordion-heading__toggle-icon {
  transform: none;
  transition: none;
}

body.page-template-page-race .wp-block-accordion-heading__toggle-icon::before {
  content: "+";
  /* 円は親 span のまま。字形だけ光学中央へ（baseline が ~2px 下に見える補正） */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% - 2px));
  font-size: 1.125rem; /* ~18px */
  font-weight: 400;
  line-height: 1;
  speak: never;
}

body.page-template-page-race
  .wp-block-accordion-item.is-open
  > .wp-block-accordion-heading
  .wp-block-accordion-heading__toggle-icon::before {
  content: "−"; /* U+2212 minus */
  /* transform は閉じ時と同じ（円位置は不変） */
  transform: translate(-50%, calc(-50% - 2px));
}

/* パネル: 本文タイポは変更せず、見出し行との間だけ余白 */
body.page-template-page-race .wp-block-accordion-panel {
  padding-block: 0.35rem 1.15rem;
  padding-inline: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
}

/*
 * Accordion 内の Buttons をテキストリンク化。
 * Results / Gallery の展開リンク向け。ENTRY(.entry-button) には当たらない。
 * 表示: 左揃え / 背景なし / 枠なし / 黒字 700 / 末尾 →
 */
body.page-template-page-race .wp-block-accordion-panel > .wp-block-buttons,
body.page-template-page-race .wp-block-accordion-panel .wp-block-buttons {
  justify-content: flex-start !important;
  gap: 0.65rem 1.25rem;
  margin: 0;
}

body.page-template-page-race .wp-block-accordion-panel .wp-block-button {
  margin: 0;
}

body.page-template-page-race .wp-block-accordion-panel .wp-block-button__link,
body.page-template-page-race .wp-block-accordion-panel a.wp-element-button {
  display: inline;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: var(--wp--preset--color--contrast, #111) !important;
  font-weight: 700 !important;
  font-size: 1.05em; /* 親本文よりわずかに強く */
  line-height: 1.5;
  text-align: left;
  text-decoration: none !important;
  white-space: normal;
}

body.page-template-page-race .wp-block-accordion-panel .wp-block-button__link::after,
body.page-template-page-race .wp-block-accordion-panel a.wp-element-button::after {
  content: " →";
  font-weight: 700;
}

body.page-template-page-race .wp-block-accordion-panel .wp-block-button__link:hover,
body.page-template-page-race .wp-block-accordion-panel .wp-block-button__link:focus,
body.page-template-page-race .wp-block-accordion-panel a.wp-element-button:hover,
body.page-template-page-race .wp-block-accordion-panel a.wp-element-button:focus {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--wp--preset--color--contrast, #111) !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

body.page-template-page-race .wp-block-accordion-panel .wp-block-button__link:focus-visible,
body.page-template-page-race .wp-block-accordion-panel a.wp-element-button:focus-visible {
  outline: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  outline-offset: 2px;
}

/* --- Details ブロック（同様の見た目） --- */
body.page-template-page-race .wp-block-details {
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--race-accordion-rule);
  margin: 0;
  padding: 0;
}

body.page-template-page-race .wp-block-details:first-of-type,
body.page-template-page-race .event-info > .wp-block-details:first-child,
body.page-template-page-race .wp-block-post-content > .wp-block-details:first-of-type {
  border-top: 1px solid var(--race-accordion-rule);
}

/* 連続 Details の二重罫線防止 */
body.page-template-page-race .wp-block-details + .wp-block-details {
  border-top: none;
}

body.page-template-page-race .wp-block-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  list-style: none;
  cursor: pointer;
  padding-block: var(--race-accordion-pad-y);
  padding-inline: 0;
  min-height: calc(var(--race-accordion-toggle-size) + var(--race-accordion-pad-y) * 2);
  background: transparent;
  border: none;
  box-shadow: none;
}

body.page-template-page-race .wp-block-details > summary::-webkit-details-marker {
  display: none;
}

body.page-template-page-race .wp-block-details > summary::marker {
  content: "";
  display: none;
}

body.page-template-page-race .wp-block-details > summary::after {
  content: "+";
  flex: 0 0 var(--race-accordion-toggle-size);
  width: var(--race-accordion-toggle-size);
  height: var(--race-accordion-toggle-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent);
  border-radius: 100%;
  background: transparent;
  box-shadow: none;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1;
  /* 円サイズ固定のまま字形だけ上へ（flex content-box の光学補正） */
  padding-bottom: 2px;
}

body.page-template-page-race .wp-block-details[open] > summary::after {
  content: "−";
}

/* summary 以外（本文）はタイポ触らない。先頭要素の上余白のみ */
body.page-template-page-race .wp-block-details > :not(summary) {
  margin-block-start: 0.35rem;
}

body.page-template-page-race .wp-block-details > :not(summary):last-child {
  margin-block-end: 1.15rem;
}

/*
 * Race LP｜通常本文（Concept / Rules / Accordion panel）
 *
 * 原因（実測）:
 *   theme.json styles.typography.fontSize = large
 *   → body ≈22px / line-height 1.7 を継承
 *   .event-info p は 18px / 1.55 に上書きされているため、
 *   #concept 直後など post-content 直下の思想文だけが大きく見える
 *   RULES / Accordion panel 内の通常 p も直下セレクタに乗らず、
 *   同 large 継承のまま CONCEPT より大きく見えていた。
 *
 * PC / Tablet（≥768）: 20px・lh 1.65（CONCEPT 基準を共有）
 * Mobile（≤767）: 変更なし（body 流体 large を CONCEPT と同じく維持）
 *
 * 対象: CONCEPT 直下 p / RULES 浅い p / Accordion panel 直下および
 *       panel 内 1 段 Group 直下の通常 Paragraph のみ。
 * 非対象: 見出し / 箇条書き / Accordion 見出し・トグル / Buttons・
 *         RESULTS テキストリンク / Overview・UPDATES・Guest・content-slider
 */
@media (min-width: 768px) {
  body.page-template-page-race .wp-block-post-content > p,
  body.page-template-page-race .wp-block-post-content > #rules + .wp-block-group > p,
  body.page-template-page-race .wp-block-post-content > #rules + .wp-block-group > .wp-block-group > p,
  body.page-template-page-race .wp-block-accordion-panel > p,
  body.page-template-page-race .wp-block-accordion-panel > .wp-block-group > p {
    font-size: 20px;
    line-height: 1.65;
  }
}

/* -------------------------------------------------------------------------- */
/* Race｜UPDATES（#updates + .event-info）                                      */
/*
 * 運営からの更新履歴。通常本文より一段小さくコンパクト。
 * 標準: 1件 = 1 Group（h4日付 / p本文 / p詳細任意）
 * カード・背景・角丸・影なし。罫線は Group 下端のみ。
 */
/* -------------------------------------------------------------------------- */

#updates + .event-info {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  align-items: stretch !important;
}

/* 1件 = Group */
#updates + .event-info > .wp-block-group {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  /* 上下 padding: 詰める。下罫線は最下部 */
  padding: 0.55rem 0 0.65rem !important;
  border: none !important;
  border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent) !important;
  box-sizing: border-box !important;
}

#updates + .event-info > .wp-block-group:last-child {
  /* 最終件も履歴境界として下線は維持 */
  margin-bottom: 0 !important;
}

#updates + .event-info > .wp-block-group > h4 {
  border-bottom: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  line-height: 1.45 !important;
  color: var(--wp--preset--color--contrast, #111);
  opacity: 0.55;
  max-width: none !important;
}

#updates + .event-info > .wp-block-group > p {
  font-size: 15.5px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  color: var(--wp--preset--color--contrast, #111);
  max-width: none !important;
  overflow-wrap: break-word;
  word-break: normal;
}

/* 詳細段落（リンク有無どちらでも） */
#updates + .event-info > .wp-block-group > h4 + p + p {
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

#updates + .event-info a {
  color: var(--race-accent, var(--wp--preset--color--accent-3, #503aa8)) !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

#updates + .event-info a:hover,
#updates + .event-info a:focus {
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

/* ---- PC / Tablet（≥768）: 日付 | 本文 | 詳細 ---- */
@media (min-width: 768px) {

  #updates + .event-info > .wp-block-group {
    display: grid !important;
    grid-template-columns: 6.75rem minmax(0, 1fr) auto;
    column-gap: 1rem;
    row-gap: 0.15rem;
    align-items: baseline;
    padding: 0.5rem 0 0.6rem !important;
  }

  #updates + .event-info > .wp-block-group > h4 {
    grid-column: 1;
    font-size: 12.5px !important;
    padding-top: 0.12em !important;
  }

  #updates + .event-info > .wp-block-group > h4 + p {
    grid-column: 2;
    font-size: 15.5px !important;
    line-height: 1.6 !important;
  }

  /* 詳細あり → 右端 */
  #updates + .event-info > .wp-block-group > h4 + p + p {
    grid-column: 3;
    justify-self: end;
    text-align: right;
    font-size: 13.5px !important;
    align-self: baseline;
  }

  /* 詳細なし（本文のみ） */
  #updates + .event-info > .wp-block-group > h4 + p:last-child {
    grid-column: 2 / -1;
  }

}

/* ---- Mobile（≤767）: 日付の下に「本文＋詳細」をインライン ---- */
@media (max-width: 767px) {

  /*
   * flex だと各 p が独立行になるため block 化。
   * 詳細あり: 本文と「詳細 →」を同一テキスト流れに続ける。
   * 詳細なし: 本文のみ block で自然折り返し。
   */
  #updates + .event-info > .wp-block-group {
    display: block !important;
    padding: 0.55rem 0 0.65rem !important;
  }

  #updates + .event-info > .wp-block-group > h4 {
    display: block !important;
    margin: 0 0 0.28rem !important;
    font-size: 13px !important;
  }

  #updates + .event-info > .wp-block-group > h4 + p {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }

  /* 詳細なし: 本文は通常ブロック */
  #updates + .event-info > .wp-block-group > h4 + p:last-child {
    display: block !important;
  }

  /* 詳細あり: 本文と詳細をインライン接続 */
  #updates + .event-info > .wp-block-group > h4 + p:has(+ p) {
    display: inline !important;
  }

  #updates + .event-info > .wp-block-group > h4 + p + p {
    display: inline !important;
    text-align: left;
    font-size: 14px !important;
    margin-left: 0.65em !important;
    padding-top: 0 !important;
    vertical-align: baseline;
  }

}

.race-news-list .wp-block-post-template {
  padding: 0 !important;
  margin: 0 !important;
}

.race-news-list .wp-block-post {
  border-bottom: 1px solid rgba(0,0,0,.18);
  padding: 12px 0 !important;
  margin: 0 !important;
}

.race-news-list .wp-block-post:first-child {
  border-top: 1px solid rgba(0,0,0,.18);
}

.race-news-list .wp-block-post-date {
  font-size: 12px !important;
  line-height: 1.4 !important;
  opacity: 0.65;
  margin: 0 0 4px !important;
}

.race-news-list .wp-block-post-title {
  font-size: 15px !important;
  line-height: 1.5 !important;
  margin: 0 !important;

  text-align: justify !important;
  text-justify: inter-character;
  line-break: loose;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: auto;
}

.race-news-list .wp-block-post-title a {
  text-decoration: none !important;

  text-align: justify !important;
  text-justify: inter-character;
  line-break: loose;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: auto;
}

.race-news-section h2 {
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  margin-bottom: 0 !important;
}

.race-news-section h2 {
  margin-bottom: 10px !important;
}

.race-news-section .race-news-list {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* Race｜COURSE ダウンロードナビ（.race-download-nav）                         */
/*
 * 表示イメージ: コースマップPDF ｜ GPXダウンロード
 * 上下 + 中央縦罫線 / 背景・角丸・影なし / 本文色 700
 * ENTRY CTA・Accordion 内 Buttons・その他 Buttons には適用しない
 *
 * 幅: constrained 本文と同じ contentSize
 *   （theme.json layout.contentSize → --wp--style--global--content-size）
 * 罫線: SCHEDULE 等 .event-info h4 と同じ 1px solid #8d7ac8
 * マップ→ナビ: page-race は main blockGap=0 のため明示余白
 *   PC / Tablet: 40px（Race 左右 gutter・hero 下余白と同系統）
 *   Mobile: 36px
 *
 * 推奨マークアップ:
 *   <!-- wp:buttons {"className":"race-download-nav",...} -->
 * 後方互換: #course + .wp-block-image + .wp-block-buttons
 */
/* -------------------------------------------------------------------------- */

body.page-template-page-race .wp-block-buttons.race-download-nav,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons {
  /* .event-info h4 border-bottom と同一（新規色は定義しない） */
  --race-dl-nav-rule: #8d7ac8;
  /* 既定: Tablet 768–1024 相当。他は media で上書き */
  --race-dl-nav-font: 1rem; /* 16px */
  /* PC / Tablet: 帯高さ ≈60–64px（上下罫線間） */
  --race-dl-nav-pad-y: 1.125rem; /* 18px */
  --race-dl-nav-pad-x: 0.5rem;
  --race-dl-nav-link-min-h: 3.875rem; /* 62px */

  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  justify-content: center !important;
  gap: 0 !important;
  box-sizing: border-box;
  width: 100%;
  /* constrained 本文幅（760）。parent padding により 390≈350 に収まる */
  max-width: var(--wp--style--global--content-size) !important;
  /* PC / Tablet: マップとナビを明確に分離（40px） */
  margin-block-start: 40px !important;
  margin-block-end: 0 !important;
  margin-inline: auto !important;
  padding: 0 !important;
  border-top: 1px solid var(--race-dl-nav-rule);
  border-bottom: 1px solid var(--race-dl-nav-rule);
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

/*
 * iPad 縦付近（700–820）: 既存 Race 読み物帯 688px と同じ
 * （上段の同 media ルールと揃える。後半の content-size !important を上書き）
 */
@media (min-width: 700px) and (max-width: 820px) {
  body.page-template-page-race .wp-block-buttons.race-download-nav,
  body.page-template-page-race
    .wp-block-post-content
    > #course
    + .wp-block-image
    + .wp-block-buttons {
    max-width: 688px !important;
  }
}

/* PC ≥1025: 本文周りとバランスの 17px（帯高さは ≥768 共通） */
@media (min-width: 1025px) {
  body.page-template-page-race .wp-block-buttons.race-download-nav,
  body.page-template-page-race
    .wp-block-post-content
    > #course
    + .wp-block-image
    + .wp-block-buttons {
    --race-dl-nav-font: 1.0625rem; /* 17px */
  }
}

/* Mobile ≤767: 帯の padding / 高さは現状維持。マップ間隔だけ 36px */
@media (max-width: 767px) {
  body.page-template-page-race .wp-block-buttons.race-download-nav,
  body.page-template-page-race
    .wp-block-post-content
    > #course
    + .wp-block-image
    + .wp-block-buttons {
    --race-dl-nav-font: 0.9375rem; /* 15px */
    --race-dl-nav-pad-y: 0.8rem;
    --race-dl-nav-pad-x: 0.35rem;
    --race-dl-nav-link-min-h: 2.75rem;
    margin-block-start: 36px !important;
  }
}

body.page-template-page-race .wp-block-buttons.race-download-nav .wp-block-button,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  .wp-block-button {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin: 0 !important;
}

/* 中央縦罫線（2項目以上のとき第2セル以降）— 上下線と同色・同太さ */
body.page-template-page-race
  .wp-block-buttons.race-download-nav
  .wp-block-button
  + .wp-block-button,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  .wp-block-button
  + .wp-block-button {
  border-inline-start: 1px solid var(--race-dl-nav-rule);
}

body.page-template-page-race
  .wp-block-buttons.race-download-nav
  .wp-block-button__link,
body.page-template-page-race
  .wp-block-buttons.race-download-nav
  a.wp-element-button,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  .wp-block-button__link,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  a.wp-element-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  min-height: var(--race-dl-nav-link-min-h, 2.75rem);
  margin: 0 !important;
  padding: var(--race-dl-nav-pad-y) var(--race-dl-nav-pad-x) !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  /* 通常本文の黒（contrast）。紫 accent は使わない */
  color: var(--wp--preset--color--contrast, #111111) !important;
  font-size: var(--race-dl-nav-font) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  line-height: 1.35 !important;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* href 未設定（GPX など）: 見た目は揃えるがナビゲーションはさせない */
body.page-template-page-race
  .wp-block-buttons.race-download-nav
  .wp-block-button__link:not([href]),
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  .wp-block-button__link:not([href]) {
  cursor: default;
  pointer-events: none;
  text-decoration: none !important;
}

body.page-template-page-race
  .wp-block-buttons.race-download-nav
  .wp-block-button__link:hover,
body.page-template-page-race
  .wp-block-buttons.race-download-nav
  .wp-block-button__link:focus,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  .wp-block-button__link:hover,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  .wp-block-button__link:focus {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--wp--preset--color--contrast, #111111) !important;
  text-decoration: underline !important;
  text-underline-offset: 0.18em;
}

body.page-template-page-race
  .wp-block-buttons.race-download-nav
  .wp-block-button__link:focus-visible,
body.page-template-page-race
  .wp-block-post-content
  > #course
  + .wp-block-image
  + .wp-block-buttons
  .wp-block-button__link:focus-visible {
  outline: 2px solid color-mix(
    in srgb,
    var(--wp--preset--color--contrast, #111111) 35%,
    transparent
  );
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Race｜ENTRY CTA（.entry-button / .race-entry-cta）                          */
/*
 * 主要 CTA。通常ボタンより一段強く。状態切替は手動（日時自動・JS なし）。
 *
 * 推奨構造（Group 親に 1 つだけ状態 class）:
 *   <!-- wp:group {"className":"race-entry-cta is-coming-soon|is-open|is-closed"} -->
 *     <!-- wp:buttons --> <!-- wp:button {"className":"entry-button"} --> …
 *     <!-- wp:paragraph {"className":"race-entry-note"} --> 開始日時（coming-soon 用）
 *
 * 状態（親 .race-entry-cta に付ける）:
 *   is-coming-soon … COMING SOON・クリック可（モシコム等 URL 可）・下に .race-entry-note
 *   is-open        … ENTRY・クリック可・エントリー URL
 *   is-closed      … ENTRY CLOSED・クリック不可
 *
 * 後方互換（ボタン上）:
 *   .entry-button.is-entry-coming-soon / .is-entry-closed
 *   ラベル文言はブロック本文で編集（CSS はテキストを差し替えない）
 *
 * 色: --race-accent（大会側で上書き可。未定義時は accent-3）
 * 詳細: docs/race-lp-components.md
 */
/* -------------------------------------------------------------------------- */

body.page-template-page-race {
  --race-accent: var(--wp--preset--color--accent-3, #503aa8);
  --race-accent-muted: color-mix(in srgb, var(--race-accent) 42%, #6b6b6b);
}

/* Main Visual 直後の ENTRY：CTA として独立する余白（数値は確定値を維持） */
body.page-template-page-race .hero-carousel.event-hero + .wp-block-buttons:has(.entry-button),
body.page-template-page-race .hero-carousel.event-hero + .wp-block-group.race-entry-cta,
body.page-template-page-race .wp-block-buttons.race-entry-cta,
body.page-template-page-race .wp-block-group.race-entry-cta {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center !important;
  width: 100% !important;
  margin-top: 56px !important; /* PC: MV→ENTRY */
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* 親 Group 内の Buttons は MV 余白を二重に取らない */
body.page-template-page-race .wp-block-group.race-entry-cta > .wp-block-buttons {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  width: 100%;
  justify-content: center !important;
}

/* 補足（COMING SOON の開始日時）— 本文テキスト。日付は編集画面で変更 */
body.page-template-page-race .wp-block-buttons:has(.entry-button) + .race-entry-note,
body.page-template-page-race .race-entry-cta + .race-entry-note,
body.page-template-page-race .race-entry-cta .race-entry-note,
.race-entry-note {
  display: block;
  text-align: center;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.04em;
  color: var(--wp--preset--color--contrast, #111);
  opacity: 0.62;
}

/* is-open / is-closed では注釈を出さない（coming-soon 専用） */
body.page-template-page-race .race-entry-cta:not(.is-coming-soon) .race-entry-note,
body.page-template-page-race
  .wp-block-buttons.race-entry-cta:not(.is-coming-soon)
  + .race-entry-note {
  display: none !important;
}

/* ENTRY → Updates（確定余白を維持） */
body.page-template-page-race .wp-block-buttons:has(.entry-button) + .race-title,
body.page-template-page-race .wp-block-buttons:has(.entry-button) + .race-entry-note + .race-title,
body.page-template-page-race .wp-block-group.race-entry-cta + .race-title,
body.page-template-page-race .race-entry-cta + .race-title {
  margin-top: 72px !important;
}

.entry-button {
  margin: 0 !important;
}

.entry-button .wp-block-button__link {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 270px !important;
  min-height: 76px !important;
  padding: 0 32px !important;
  border: none !important;
  border-radius: 999px !important;
  background: var(--race-accent, var(--wp--preset--color--accent-3, #503aa8)) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: none !important;
  text-align: center !important;
  transition: background-color 0.2s ease, filter 0.2s ease;
}

.entry-button .wp-block-button__link:hover,
.entry-button .wp-block-button__link:focus {
  background: var(--race-accent, var(--wp--preset--color--accent-3, #503aa8)) !important;
  color: #fff !important;
  box-shadow: none !important;
  filter: brightness(1.06);
}

.entry-button .wp-block-button__link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--race-accent, #503aa8) 55%, #fff);
  outline-offset: 3px;
}

/*
 * COMING SOON: ミュート色・クリック可（URL があれば遷移）
 * CLOSED: ミュート色・クリック不可
 * ラベル文言は CSS で書き換えない → ブロック本文で手動編集
 */
.race-entry-cta.is-coming-soon .entry-button .wp-block-button__link,
.entry-button.is-entry-coming-soon .wp-block-button__link {
  background: var(--race-accent-muted, #7a7a7a) !important;
  color: #fff !important;
  box-shadow: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.race-entry-cta.is-coming-soon .entry-button .wp-block-button__link:hover,
.race-entry-cta.is-coming-soon .entry-button .wp-block-button__link:focus,
.entry-button.is-entry-coming-soon .wp-block-button__link:hover,
.entry-button.is-entry-coming-soon .wp-block-button__link:focus {
  background: var(--race-accent-muted, #7a7a7a) !important;
  color: #fff !important;
  box-shadow: none !important;
  filter: brightness(1.06);
  text-decoration: none !important;
}

.race-entry-cta.is-closed .entry-button .wp-block-button__link,
.entry-button.is-entry-closed .wp-block-button__link,
.entry-button .wp-block-button__link[aria-disabled="true"],
.race-entry-cta.is-closed .entry-button .wp-block-button__link:hover,
.race-entry-cta.is-closed .entry-button .wp-block-button__link:focus,
.entry-button .wp-block-button__link[aria-disabled="true"]:hover,
.entry-button .wp-block-button__link[aria-disabled="true"]:focus,
.entry-button.is-entry-closed .wp-block-button__link:hover {
  pointer-events: none !important;
  cursor: default !important;
  filter: none !important;
  background: var(--race-accent-muted, #7a7a7a) !important;
  color: #fff !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* Tablet 768–1024 */
@media (min-width: 768px) and (max-width: 1024px) {

  body.page-template-page-race .hero-carousel.event-hero + .wp-block-buttons:has(.entry-button),
  body.page-template-page-race .hero-carousel.event-hero + .wp-block-group.race-entry-cta,
  body.page-template-page-race .wp-block-buttons.race-entry-cta,
  body.page-template-page-race .wp-block-group.race-entry-cta {
    margin-top: 48px !important; /* Tablet: MV→ENTRY */
  }

  body.page-template-page-race .wp-block-buttons:has(.entry-button) + .race-title,
  body.page-template-page-race .wp-block-buttons:has(.entry-button) + .race-entry-note + .race-title,
  body.page-template-page-race .wp-block-group.race-entry-cta + .race-title,
  body.page-template-page-race .race-entry-cta + .race-title {
    margin-top: 64px !important;
  }

  .entry-button .wp-block-button__link {
    min-width: 230px !important;
    min-height: 68px !important;
    padding: 0 28px !important;
    font-size: 20px !important;
  }

  .race-entry-note {
    font-size: 12.5px !important;
  }

}

/* Mobile ≤767 */
@media (max-width: 767px) {

  body.page-template-page-race .hero-carousel.event-hero + .wp-block-buttons:has(.entry-button),
  body.page-template-page-race .hero-carousel.event-hero + .wp-block-group.race-entry-cta,
  body.page-template-page-race .wp-block-buttons.race-entry-cta,
  body.page-template-page-race .wp-block-group.race-entry-cta {
    margin-top: 44px !important; /* Mobile: MV→ENTRY */
  }

  body.page-template-page-race .wp-block-buttons:has(.entry-button) + .race-title,
  body.page-template-page-race .wp-block-buttons:has(.entry-button) + .race-entry-note + .race-title,
  body.page-template-page-race .wp-block-group.race-entry-cta + .race-title,
  body.page-template-page-race .race-entry-cta + .race-title {
    margin-top: 56px !important;
  }

  .entry-button .wp-block-button__link {
    min-width: 200px !important;
    min-height: 60px !important;
    padding: 0 24px !important;
    font-size: 18px !important;
    letter-spacing: 0.05em;
  }

  .race-entry-note {
    font-size: 12px !important;
    margin-top: 10px !important;
  }

}

/* -------------------------------------------------------------------------- */
/* Race-3｜スポンサーセクション（theme.json styles.css より複製）                */
/* -------------------------------------------------------------------------- */

.race-partners {
  background: #fff;
  padding: 40px 20px;
  margin: 40px 0;
}

.race-partners h3 {
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.12em;
  margin: 0 0 24px;
}

.sponsor-large,
.sponsor-medium,
.supporter-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.sponsor-large {
  grid-template-columns: 1fr;
}

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

.race-partners figure,
.race-partners .wp-block-image {
  background: #fff;
  margin: 0;
}

.race-partners img {
  width: 100%;
  height: auto;
  display: block;
}

.sponsor-section {
  background: #fff;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 40px 0 !important;
}

@media (max-width: 768px) {
  .sponsor-medium,
  .supporter-grid {
    padding-left: 28px !important;
    padding-right: 28px !important;
    box-sizing: border-box;
  }
}

@media (min-width: 769px) {

  .race-partners {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 80px 0 !important;
    background: #fff !important;
  }

  .race-partners > * {
    max-width: var(--wp--style--global--content-size) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

}

@media (min-width: 769px) {

  .race-partners {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: #fff !important;
  }

  .race-partners .wp-block-group,
  .race-partners .wp-block-grid,
  .race-partners .wp-block-columns,
  .race-partners .sponsor-large,
  .race-partners .sponsor-medium,
  .race-partners .supporter-grid {
    max-width: var(--wp--style--global--content-size) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .sponsor-button {
  margin-top: 32px !important;
  margin-bottom: 48px !important;
}

}

/* -------------------------------------------------------------------------- */
/* Race-4｜Main Visual .hero-carousel.event-hero（静的 Image・記事カードではない） */
/*
 * 運用: 静的 Image ブロック（Query Loop 不使用）。
 * 構造例:
 *   .hero-carousel.event-hero > .wp-block-post-template(Group) > figure.wp-block-image
 *   .hero-carousel.event-hero > figure.wp-block-image（直下に並ぶ場合も可）
 * リンクは Image に任意設定。未設定は cursor を操作しない。
 * 比率: PC/Tablet 6:4 / Mobile 1:1。gap: 全デバイス 4px（2枚以上時）。
 * 1枚のみ: :has() で自動判定し静的中央配置（横スクロール・snap なし）。
 * :has 対応: Chrome 105+, Safari 15.4+, Firefox 121+（現行ブラウザ想定内）。
 * トップ .hero-carousel / .top-hero とは分離。
 */
/* -------------------------------------------------------------------------- */

/* 1枚のみ自動判定（編集画面での class 付け替え不要） */
.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  scroll-snap-type: none !important;
  scroll-padding-inline: 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
)::-webkit-scrollbar {
  display: none;
}

/* 直下 1 枚: 複数枚用 max-content トラックを上書き */
.hero-carousel.event-hero:has(> .wp-block-image:only-child) {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  gap: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

/* トラック内 1 枚: 中央配置・gap なし */
.hero-carousel.event-hero:is(
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) {
  display: flex !important;
  justify-content: center !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) > .wp-block-post-template,
.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) > .wp-block-group:not(.wp-block-post-template) {
  width: 100% !important;
  max-width: 100% !important;
  gap: 0 !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) > .wp-block-post-template > *,
.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) > .wp-block-group:not(.wp-block-post-template) > *,
.hero-carousel.event-hero:has(> .wp-block-image:only-child) > .wp-block-image {
  scroll-snap-align: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) img {
  object-position: center !important;
}

/* 記事メタ・タイトルは出さない（Query 残骸・誤配置の保険） */
.hero-carousel.event-hero .wp-block-post-title,
.hero-carousel.event-hero .wp-block-post-date,
.hero-carousel.event-hero .wp-block-post-excerpt,
.hero-carousel.event-hero .trails-card-meta,
.hero-carousel.event-hero .wp-block-post-author-name {
  display: none !important;
}

/* 画像トラック（Group / 旧 post-template class 名の壳） */
.hero-carousel.event-hero > .wp-block-post-template,
.hero-carousel.event-hero > .wp-block-group:not(.wp-block-post-template) {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  width: max-content !important;
  margin: 0 !important;
  box-sizing: content-box !important;
}

/* 直下に Image が並ぶ場合も 1 軌道として扱う */
.hero-carousel.event-hero:has(> .wp-block-image) {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  width: max-content !important;
}

/* 1枚: 複数枚用 max-content トラックを上書き（一般ルールの直後） */
.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) > .wp-block-post-template,
.hero-carousel.event-hero:is(
  :has(> .wp-block-image:only-child),
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) > .wp-block-group:not(.wp-block-post-template) {
  width: 100% !important;
  max-width: 100% !important;
  gap: 0 !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.hero-carousel.event-hero:has(> .wp-block-image:only-child) {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  gap: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

.hero-carousel.event-hero:is(
  :has(> .wp-block-post-template > :only-child),
  :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
) {
  display: flex !important;
  justify-content: center !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

.hero-carousel.event-hero figure.wp-block-image,
.hero-carousel.event-hero > .wp-block-post-template > .wp-block-image,
.hero-carousel.event-hero > .wp-block-post-template > figure,
.hero-carousel.event-hero > .wp-block-post-template > * {
  margin: 0 !important;
}

.hero-carousel.event-hero figure.wp-block-image,
.hero-carousel.event-hero .wp-block-image {
  line-height: 0;
}

/* リンク未設定はクリック可能に見せない */
.hero-carousel.event-hero,
.hero-carousel.event-hero figure,
.hero-carousel.event-hero img {
  cursor: default;
}

.hero-carousel.event-hero a {
  cursor: pointer;
  display: block;
  color: inherit;
  text-decoration: none;
}

.hero-carousel.event-hero a img {
  cursor: pointer;
}

.hero-carousel.event-hero img {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  display: block !important;
}

/* ---- Mobile（≤767）: 1:1 / gap 4px / 横スクロール ---- */
@media (max-width: 767px) {

  .hero-carousel.event-hero {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    margin-top: 0 !important;
    padding: 0 !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .hero-carousel.event-hero > .wp-block-post-template,
  .hero-carousel.event-hero > .wp-block-group:not(.wp-block-post-template) {
    gap: 4px !important;
    padding: 0 10px !important;
  }

  .hero-carousel.event-hero > .wp-block-post-template > *,
  .hero-carousel.event-hero > .wp-block-group:not(.wp-block-post-template) > *,
  .hero-carousel.event-hero > .wp-block-image {
    flex: 0 0 92vw !important;
    width: 92vw !important;
    scroll-snap-align: start;
    margin: 0 !important;
  }

  .hero-carousel.event-hero img {
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
  }

  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) {
    overflow-x: hidden !important;
    scroll-snap-type: none !important;
    scroll-padding-inline: 0 !important;
  }

  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-post-template,
  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-group:not(.wp-block-post-template) {
    padding: 0 !important;
    gap: 0 !important;
    justify-content: center !important;
  }

  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-post-template > *,
  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-group:not(.wp-block-post-template) > *,
  .hero-carousel.event-hero:has(> .wp-block-image:only-child) > .wp-block-image {
    flex: 0 0 100vw !important;
    width: 100vw !important;
    scroll-snap-align: none !important;
  }

}

/* ---- PC / Tablet（≥768）: 6:4 / gap 4px ---- */
@media (min-width: 768px) {

  .hero-carousel.event-hero {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    margin-top: 45px !important;
    padding: 0 !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 40px !important;
    -webkit-overflow-scrolling: touch;
  }

  .hero-carousel.event-hero > .wp-block-post-template,
  .hero-carousel.event-hero > .wp-block-group:not(.wp-block-post-template) {
    gap: 4px !important;
    padding: 0 40px !important;
  }

  /* PC: スライド 760 維持 */
  .hero-carousel.event-hero > .wp-block-post-template > *,
  .hero-carousel.event-hero > .wp-block-group:not(.wp-block-post-template) > *,
  .hero-carousel.event-hero > .wp-block-image {
    flex: 0 0 760px !important;
    width: 760px !important;
    scroll-snap-align: start;
    margin: 0 !important;
  }

  .hero-carousel.event-hero img {
    aspect-ratio: 6 / 4 !important;
    object-fit: cover !important;
  }

  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) {
    overflow-x: hidden !important;
    scroll-snap-type: none !important;
    scroll-padding-inline: 0 !important;
  }

  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-post-template,
  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-group:not(.wp-block-post-template) {
    padding: 0 40px !important;
    gap: 0 !important;
    justify-content: center !important;
  }

  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-post-template > *,
  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-group:not(.wp-block-post-template) > *,
  .hero-carousel.event-hero:has(> .wp-block-image:only-child) > .wp-block-image {
    flex: 0 0 760px !important;
    width: 760px !important;
    scroll-snap-align: none !important;
  }

}

/*
 * Tablet のみ（768–1024）: 1枚目を viewport 左右対称に置く
 * 左 gutter 40 = 右 gutter 40 → 1枚目幅 = 100vw − 80
 * （768 なら 688。track は右へ続き、gap 4px 維持。PC 760・Mobile 92vw は触らない）
 */
@media (min-width: 768px) and (max-width: 1024px) {

  .hero-carousel.event-hero > .wp-block-post-template > *,
  .hero-carousel.event-hero > .wp-block-group:not(.wp-block-post-template) > *,
  .hero-carousel.event-hero > .wp-block-image {
    flex: 0 0 calc(100vw - 80px) !important;
    width: calc(100vw - 80px) !important;
  }

  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-post-template > *,
  .hero-carousel.event-hero:is(
    :has(> .wp-block-image:only-child),
    :has(> .wp-block-post-template > :only-child),
    :has(> .wp-block-group:not(.wp-block-post-template) > :only-child)
  ) > .wp-block-group:not(.wp-block-post-template) > *,
  .hero-carousel.event-hero:has(> .wp-block-image:only-child) > .wp-block-image {
    flex: 0 0 calc(100vw - 80px) !important;
    width: calc(100vw - 80px) !important;
  }

}

/* -------------------------------------------------------------------------- */
/* Group Run（theme.json styles.css より複製）                                  */
/* -------------------------------------------------------------------------- */

/* ==================================================
   Top page｜GROUP RUN カード内調整
================================================== */

.group-run-card img {
  max-width: 160px !important;
  height: auto !important;
  margin: 0 auto 18px !important;
  display: block !important;
}

.group-run-card p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  text-align: center !important;
  margin: 0 0 12px !important;
}

.group-run-card p:first-child {
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-align: center !important;
  margin-bottom: 18px !important;
}

/* ==================================================
   Top page｜GROUP RUN カード
================================================== */

.wp-block-group.group-run-card {
  margin: 30px auto 56px !important;
  padding: 28px 24px !important;
  border: 1px solid rgba(0, 0, 0, .18) !important;
  border-radius: 60px !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* ==================================================
   Top page｜GROUP RUN ボタン
================================================== */

.group-run-link {
  margin-top: -8px !important;
  margin-bottom: -52px !important;
  text-align: center !important;
}

.group-run-link .wp-block-button__link {
  background: #fff !important;
  color: inherit !important;
  border: 1px solid rgba(0,0,0,.18) !important;
  border-radius: 999px !important;
  padding: 8px 22px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-decoration: none !important;
  transition: .25s ease !important;
}

.group-run-link .wp-block-button__link:hover {
  opacity: .65;
}

/* -------------------------------------------------------------------------- */
/* Content Slider（Race LP 標準横スライダー）                                   */
/* -------------------------------------------------------------------------- */

/*
 * 汎用カード構造（大会専用 class なし）:
 * .content-slider > Group(カード) > Image + Heading + Paragraph(任意)
 *
 * レイアウト: PC / Tablet / Mobile すべて手動横スクロール（JS / 自動再生なし）
 *   gap 4px / scroll-snap / スクロールバー非表示 / flex-shrink:0
 *
 * 端の設計（固定 margin 合わせではなく 3 要素に分離）:
 *   --slider-gutter  … 開始余白＝終了余白（対称）
 *   スクロール領域  … width:100vw / full-bleed（途中カードは viewport 端まで可）
 *   --slider-card-width … カード幅（--cs-visible と gap から算出）
 *
 * ガター基準:
 *   PC / Tablet: Main Visual（.event-hero）と同じ 40px
 *   Mobile: 通常本文左右と同じ 20px
 *
 * 可視枚数目安（次カードが必ず途中まで見える）:
 *   1440 ≈ 2.3 / 1024 ≈ 1.9 / 768 ≈ 1.7 / 390 ≈ 1.15
 *   モバイルのカード幅は content 列（100vw - gutter×2）基準で維持
 *
 * 画像: 標準 3:2、is-ratio-* で変更 / cover / center
 * 背景: is-slider-bg-default / soft / accent
 * 対象外: .hero-carousel.event-hero / UPDATES / Race Hero・Nav・Entry
 */
.content-slider {
  --content-slider-bg: var(--race-slider-bg-default, transparent);
  --content-slider-card-bg: var(--race-slider-card-bg, transparent);

  /* 開始余白 = 終了余白（対称） / Main Visual 既定 40px */
  --slider-gutter: 40px;
  --cs-gap: 4px;
  /* 可視カード数（端数）— PC 基準 */
  --cs-visible: 2.3;
  /* 標準画像比率 3:2 — is-ratio-* / section 指定で上書き可 */
  --cs-img-ratio: 3 / 2;
  /*
   * 標準カード内メトリクス（Image + H3 + P）
   * トラック幅 / ガター / 表示枚数とは独立。
   * PC 既定 → Tablet / Mobile で上書き。
   */
  --cs-text-pad: 48px;
  --cs-title-size: 28px;
  --cs-body-size: 17px;
  --cs-body-lh: 1.78;
  --cs-space-img-title: 30px;
  --cs-space-title-body: 19px;
  --cs-space-body-end: 32px;
  /*
   * カード幅: 開始位置〜viewport 右端に cs-visible 枚が収まる幅。
   * （左 gutter 分は覗き計算から除外。終了 gutter は padding-right）
   */
  --slider-card-width: calc(
    (100vw - var(--slider-gutter) - (var(--cs-visible) - 1) * var(--cs-gap))
      / var(--cs-visible)
  );

  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: var(--cs-gap) !important;
  column-gap: var(--cs-gap) !important;
  row-gap: 0 !important;
  /* WP is-layout-grid を打ち消し */
  grid-template-columns: none !important;
  grid-template-rows: none !important;

  /*
   * full-bleed スクロール領域（760 等の constrained に閉じ込めない）
   * padding-inline = 開始／終了余白（スクロール内に含まれる）
   */
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  width: 100vw !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  padding-left: var(--slider-gutter) !important;
  padding-right: var(--slider-gutter) !important;
  padding-block: 0.5rem;
  scroll-padding-inline: var(--slider-gutter);

  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  background-color: var(--content-slider-bg);
  /* WP Group gap 変数を無効化（flex gap に統一） */
  --wp--style--block-gap: 0px !important;

  /* 横スクロールバー非表示（スクロール自体は有効） */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.content-slider::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* 背景バリエーション */
.content-slider.is-slider-bg-default {
  --content-slider-bg: var(--race-slider-bg-default, transparent);
}

.content-slider.is-slider-bg-soft {
  --content-slider-bg: var(
    --race-slider-bg-soft,
    color-mix(in srgb, currentColor 5%, transparent)
  );
  --content-slider-card-bg: var(--race-slider-card-bg-soft, transparent);
  padding-block: 1rem;
}

.content-slider.is-slider-bg-accent {
  --content-slider-bg: var(
    --race-slider-bg-accent,
    color-mix(in srgb, currentColor 9%, transparent)
  );
  --content-slider-card-bg: var(--race-slider-card-bg-accent, transparent);
  padding-block: 1rem;
}

/* 画像比率バリエーション（slider / カード） — 未指定は 3:2 */
.content-slider.is-ratio-3-2,
.content-slider > .wp-block-group.is-ratio-3-2 {
  --cs-img-ratio: 3 / 2;
}

.content-slider.is-ratio-16-9,
.content-slider > .wp-block-group.is-ratio-16-9 {
  --cs-img-ratio: 16 / 9;
}

.content-slider.is-ratio-1-1,
.content-slider > .wp-block-group.is-ratio-1-1 {
  --cs-img-ratio: 1 / 1;
}

/*
 * Guest Runners: セクション直後の content-slider を 1:1 に。
 * 本体の標準は 3:2 のまま。Field / Sponsor 等は is-ratio-* で個別指定。
 * （#guests はブロック anchor。人物名／大会名には依存しない）
 */
#guests + .content-slider {
  --cs-img-ratio: 1 / 1;
}

/* カード本体（Group）— 縮小させない */
.content-slider > .wp-block-group,
.content-slider > .wp-block-image,
.content-slider > figure.wp-block-image {
  flex: 0 0 var(--slider-card-width) !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  width: var(--slider-card-width) !important;
  min-width: var(--slider-card-width) !important;
  max-width: var(--slider-card-width) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  background-color: var(--content-slider-card-bg);
  /* カード自体に padding を付けない（画像は全幅） */
  padding: 0 !important;
}

.content-slider > .wp-block-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
}

/* 写真: カード幅いっぱい + センタートリミング */
.content-slider > .wp-block-group > .wp-block-image,
.content-slider > .wp-block-group > figure.wp-block-image {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  line-height: 0;
  flex-shrink: 0;
}

.content-slider > .wp-block-group > .wp-block-image img,
.content-slider > .wp-block-group > figure.wp-block-image img,
.content-slider > .wp-block-image img,
.content-slider > figure.wp-block-image img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--cs-img-ratio) !important;
  object-fit: cover !important;
  object-position: center !important;
}

/*
 * 標準カード内テキスト（Image + Heading + Paragraph）
 * 画像は全幅のまま、テキストのみ左右インデント＋縦リズム。
 */
.content-slider > .wp-block-group > :where(h2, h3, h4).wp-block-heading,
.content-slider > .wp-block-group > .wp-block-heading,
.content-slider > .wp-block-group > p,
.content-slider > .wp-block-group > .wp-block-paragraph {
  padding-left: var(--cs-text-pad) !important;
  padding-right: var(--cs-text-pad) !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* 見出し（Guest 名は意味上 H3 を標準）— 視覚サイズは CSS 変数 */
.content-slider > .wp-block-group > :where(h2, h3, h4).wp-block-heading,
.content-slider > .wp-block-group > .wp-block-heading,
.content-slider h2,
.content-slider h3 {
  margin-top: var(--cs-space-img-title) !important;
  margin-bottom: 0 !important;
  font-size: var(--cs-title-size) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  opacity: 1;
}

/*
 * コピー型カード（任意）:
 * Group に is-card-copy を付けたときだけ H3 をやや小さく・複数行向けに。
 * 標準タイトル型（Guest 人名等）は --cs-title-size のまま。body / 余白 / 比率は不変。
 */
.content-slider > .wp-block-group.is-card-copy {
  --cs-copy-title-size: 24px;
  --cs-copy-title-lh: 1.35;
}

@media (max-width: 1024px) {
  .content-slider > .wp-block-group.is-card-copy {
    --cs-copy-title-size: 22px;
    --cs-copy-title-lh: 1.35;
  }
}

@media (max-width: 767px) {
  .content-slider > .wp-block-group.is-card-copy {
    --cs-copy-title-size: 20px;
    --cs-copy-title-lh: 1.4;
  }
}

.content-slider > .wp-block-group.is-card-copy > :where(h2, h3, h4).wp-block-heading,
.content-slider > .wp-block-group.is-card-copy > .wp-block-heading,
.content-slider > .wp-block-group.is-card-copy h2,
.content-slider > .wp-block-group.is-card-copy h3 {
  font-size: var(--cs-copy-title-size) !important;
  line-height: var(--cs-copy-title-lh) !important;
}

/* 本文（左右は既定で --cs-text-pad。Mobile のみ --cs-body-pad で上書き可） */
.content-slider > .wp-block-group > p,
.content-slider > .wp-block-group > .wp-block-paragraph,
.content-slider p {
  margin-top: var(--cs-space-title-body) !important;
  margin-bottom: 0 !important;
  padding-bottom: var(--cs-space-body-end) !important;
  font-size: var(--cs-body-size) !important;
  line-height: var(--cs-body-lh) !important;
  text-align: left !important;
  padding-left: var(--cs-body-pad, var(--cs-text-pad)) !important;
  padding-right: var(--cs-body-pad, var(--cs-text-pad)) !important;
}

/* ---- ブレーク別: トラック（可視枚数/ガター）＋ カード内メトリクス ---- */
/* Tablet 横 〜1200: 表示枚数 */
@media (max-width: 1200px) {
  .content-slider {
    --cs-visible: 1.9;
  }
}

/* Tablet 〜1024: カード内テキスト */
@media (max-width: 1024px) {
  .content-slider {
    --cs-text-pad: 38px;
    --cs-title-size: 26px;
    --cs-body-size: 16px;
    --cs-body-lh: 1.78;
    --cs-space-img-title: 27px;
    --cs-space-title-body: 17px;
    --cs-space-body-end: 28px;
  }
}

/* Tablet 縦帯（768 含む）— Main Visual と同じ gutter 40 を維持 */
@media (max-width: 900px) and (min-width: 768px) {
  .content-slider {
    --cs-visible: 1.7;
    padding-block: 0.35rem;
  }
}

/* Mobile（≤767）: 本文 20px ガター / カード幅 content 列基準 1.15 枚 */
@media (max-width: 767px) {
  .content-slider {
    --slider-gutter: 20px;
    --cs-visible: 1.15;
    padding-block: 0.35rem;
    /*
     * カード幅 ≈ content 列基準:
     * (100vw - 2*gutter) に 1.15 枚 → ≈304@390
     */
    --slider-card-width: calc(
      (100vw - 2 * var(--slider-gutter) - (var(--cs-visible) - 1) * var(--cs-gap))
        / var(--cs-visible)
    );
    /* カード内 Mobile（H3 余白は --cs-text-pad のまま） */
    --cs-text-pad: 24px;
    --cs-title-size: 24px;
    --cs-body-size: 16px;
    /* 本文のみ: 幅を少し広げ・天地を抑える */
    --cs-body-pad: 18px;
    --cs-body-lh: 1.65;
    --cs-space-img-title: 24px;
    --cs-space-title-body: 15px;
    --cs-space-body-end: 24px;
  }
}

/* -------------------------------------------------------------------------- */
/* Genre / fixed-page entrance（Magazine・Podcast・Event 等）                   */
/* Article 入口（PC72 / SP8・応急）と同じ上余白のあと、タイトル → 本文。         */
/* -------------------------------------------------------------------------- */

.page-entrance.page-title {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding-inline: 24px !important;
  min-height: 0 !important;
  /* SP (base, ≤768): entrance under header — temp 28→8. PC: 769+ media. */
  padding-top: 8px !important;
  padding-bottom: 16px !important;
}

@media (min-width: 769px) {
  .page-entrance.page-title {
    /* PC: match Article entrance (72px) before the genre title. */
    padding-top: 72px !important;
    padding-bottom: 28px !important;
  }
}

.page-title h1,
.page-entrance.page-title .wp-block-post-title {
  text-align: center !important;
  font-family: "Playwrite GB J" !important;
  /* Sized to sit inside the entrance band (was up to 72px with negative pull). */
  font-size: clamp(28px, 4.2vw, 56px) !important;
  font-weight: 400 !important;
  font-style: italic !important;
  line-height: 1.1 !important;
  letter-spacing: -0.03em;
  margin: 0 !important;
  padding: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* Content Top Space（theme.json styles.css より複製）                          */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {

  .content-top-space {
    margin-top: 101px !important;
  }

}

/* -------------------------------------------------------------------------- */
/* Issue Contents（theme.json styles.css より複製）                             */
/* -------------------------------------------------------------------------- */

/* ==================================================
   Contents
================================================== */

.contents-header {
  display: flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  margin-top: 50px !important;
}

.contents-main {
  font-size: 30px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.contents-sub {
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  opacity: 0.7;
  margin: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* Contributor（theme.json styles.css より複製）                                */
/* -------------------------------------------------------------------------- */

/* ==================================================
   Contributors / 寄稿者一覧
================================================== */

.contributor-card {
  border-bottom: 1px solid rgba(0,0,0,.18);
  padding-bottom: 48px;
  margin-bottom: 56px;
}

.contributor-profile {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.contributor-avatar {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 50%;
}

.contributor-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.contributor-info {
  flex: 1 1 auto;
  margin: 0;
  gap: 0 !important;
  row-gap: 0 !important;
  --wp--style--block-gap: 0px !important;
}

.contributor-info > * {
  margin-top: 0 !important;
  margin-bottom: 20px !important;
}

.contributor-name {
  font-size: 24px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  margin: 0 0 8px !important;
}

.contributor-bio {
  font-size: 18px !important;
  line-height: 1.65 !important;
  font-weight: 500 !important;
  margin: 0 0 8px !important;
}

.contributor-sns {
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.contributor-sns a {
  text-decoration: none !important;
  color: #592ba7 !important;
}

.contributor-series {
  display: flex !important;
  align-items: baseline !important;
  gap: 0 !important;
  flex-wrap: wrap !important;
  margin: 0 0 10px !important;
  --wp--style--block-gap: 0px !important;
}

.contributor-genre {
  font-size: 16px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  margin: 0 !important;
}

.contributor-genre::after {
  content: "｜";
  display: inline-block;
  margin: 0 .25em;
  font-weight: 400 !important;
  opacity: .85;
}

.contributor-series-title {
  font-size: 20px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.contributor-posts .wp-block-post-template {
  padding: 0 !important;
  margin: 0 !important;
}

.contributor-posts .wp-block-post {
  border-top: 1px solid rgba(0,0,0,.12);
  padding: 10px 0 !important;
  margin: 0 !important;
}

.contributor-posts .wp-block-post-title {
  font-size: 20px !important;
  line-height: 1.55 !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.contributor-posts .wp-block-post-title a {
  text-decoration: none !important;
  color: #592ba7 !important;
}

/* 自動生成 Contributors（/contributors/ および /contributors-dev/）。記事タイトルより一回り小さく右揃え */
.contributor-posts .wp-block-post-title.contributor-all-posts {
  font-size: 14px !important;
  text-align: right !important;
}

@media (max-width: 768px) {
  .contributor-profile {
    gap: 16px;
  }

  .contributor-avatar {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
  }

  .contributor-name {
    font-size: 20px !important;
  }

  .contributor-bio {
    font-size: 15px !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Race残存｜news-section / info-block（theme.json styles.css より複製）         */
/* -------------------------------------------------------------------------- */

.info-block {
  gap: 0 !important;
  row-gap: 0 !important;
  --wp--style--block-gap: 0px !important;
}

.info-block h3 {
  margin: 0 0 2px !important;
  line-height: 1.5 !important;
}

.info-block p {
  margin: 0 0 8px !important;
  line-height: 2.5 !important;
}

@media (min-width: 769px) {

  .news-section {
  margin-top: 80px !important;
}

}

/* -------------------------------------------------------------------------- */
/* Single（theme.json styles.css より複製）                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {

  .single .wp-block-post-title {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }

}

@media (max-width: 768px) {
  .single .wp-block-post-title {
    text-align: justify !important;
    text-justify: inter-character;
    line-break: loose;
    word-break: normal;
    overflow-wrap: normal;
    text-wrap: auto;
  }
}

.single.tag-cover .single-default-title,
.single.tag-cover .single-default-author {
  display: none !important;
}

/* ==================================================
   個別投稿テンプレート｜ヘッダー下の余白調整
   Article 入口（PC72 / SP8・応急）に揃える。Article 統合後に整理可。
================================================== */

.single-post-main {
  margin-top: 72px !important;
}

@media (max-width: 768px) {
  .single-post-main {
    margin-top: 8px !important;
  }
}

/*
 * single.html など .single-post-main が無い場合も同リズム。
 * Article / Feature / issue-cover は除外（各自の入口・余白を維持）。
 */
body.single:not(.article-template):not(.post-template-wp-custom-template-2):not(.post-template-issue-cover) main.wp-block-group {
  margin-top: 72px !important;
}

@media (max-width: 768px) {
  body.single:not(.article-template):not(.post-template-wp-custom-template-2):not(.post-template-issue-cover) main.wp-block-group {
    margin-top: 8px !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Article template（標準記事）                                                 */
/* -------------------------------------------------------------------------- */

.article-main {
  margin-top: 0 !important;
}

/*
 * Article reading column follows theme.json contentSize (760px).
 * Featured image is a separate “viewing” stage:
 *   PC landscape → max 1200px, native ratio, centered
 *   PC portrait/square → content width × 4:5 cover, centered
 * SP → viewport minus side gutters; no horizontal scroll.
 * Issue cover (issue-cover template) shares the same FI first-view stage.
 */
body.article-template,
body.post-template-issue-cover,
body.page-template-wp-custom-template {
  --article-content-width: var(--wp--style--global--content-size);
  --article-featured-landscape-max: 1200px;
}

/*
 * Entrance band between header and FI.
 * Holds vertical rhythm now; genre label / pre-title can drop in later.
 */
.article-template .article-entrance,
.post-template-issue-cover .article-entrance {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  box-sizing: border-box !important;
  width: min(var(--article-content-width), calc(100vw - 48px)) !important;
  max-width: var(--article-content-width) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-inline: 0 !important;
  /* SP (base, ≤768): entrance under header — temp 28→8. PC: 769+ media. */
  min-height: 8px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

@media (min-width: 769px) {
  .article-template .article-entrance,
  .post-template-issue-cover .article-entrance {
    /* PC: 7trails entrance rhythm. */
    min-height: 72px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

/*
 * Standard post titles (Article / default / Podcast): PC ≈36px for 760 reading column.
 * SP keeps template preset (xx-large / x-large fluid). Skip Feature template.
 * TEST: 40→36 for PC scale check.
 */
@media (min-width: 769px) {
  body.single:not(.post-template-wp-custom-template-2) h1.wp-block-post-title {
    font-size: 36px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
  }
}

/*
 * Featured stage: structural .article-featured only（body class 非依存）。
 * beats generic .issue-featured-wrap { max-width: content-size }.
 * Shared by Article / Issue cover / イメージのない固定ページ.
 * Note: do NOT redefine --article-content-width here (would resolve against
 * the local content-size:100% override and break portrait framing).
 */
.article-featured.issue-featured-wrap {
  --article-featured-landscape-max: 1200px;
  --wp--style--global--content-size: 100%;
  position: relative !important;
  width: min(var(--article-featured-landscape-max), calc(100vw - 48px)) !important;
  max-width: var(--article-featured-landscape-max) !important;
  margin-top: 0 !important;
  margin-bottom: 40px !important; /* SP: keep 40 */
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* No FI (entrance pages): collapse empty stage so page title → content spacing stays. */
.page-template-wp-custom-template .article-featured.issue-featured-wrap:not(:has(img)) {
  display: none !important;
  margin: 0 !important;
}

@media (min-width: 769px) {
  .article-featured.issue-featured-wrap {
    /* PC: brief pause after FI/caption before title chrome. */
    margin-bottom: 56px !important;
  }
}

.article-featured .wp-block-post-featured-image {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: none !important;
}

/* Landscape: up to 1200px, native ratio, no crop. */
.article-featured .wp-block-post-featured-image.is-landscape,
.article-featured .wp-block-post-featured-image:not(.is-portrait) {
  width: 100% !important;
}

.article-featured .wp-block-post-featured-image.is-landscape img,
.article-featured .wp-block-post-featured-image:not(.is-portrait) img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: unset !important;
  object-position: center center !important;
}

/* Portrait + square: 760px reading width × 4:5 cover (SP: same guttered width).
 * Crop lives on the img (aspect-ratio + object-fit), not a clipped outer box.
 * Outer overflow/absolute crop trapped FSM figcaption inside the image area. */
.article-featured .wp-block-post-featured-image.is-portrait {
  position: relative !important;
  width: min(var(--article-content-width, 760px), calc(100vw - 48px)) !important;
  max-width: var(--article-content-width, 760px) !important;
  aspect-ratio: auto !important;
  height: auto !important;
  overflow: visible !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.article-featured .wp-block-post-featured-image.is-portrait img {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 4 / 5 !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* FSM wraps img + figcaption; keep caption in normal flow under the 4:5 image. */
.article-featured .wp-block-post-featured-image.is-portrait .fsmcfi-fig {
  display: block !important;
  margin: 0 !important;
  width: 100% !important;
  position: static !important;
  overflow: visible !important;
}

.article-featured .wp-block-post-featured-image.is-portrait figcaption,
.article-featured .wp-block-post-featured-image figcaption {
  position: static !important;
  display: block !important;
}

/* When FI is portrait, shrink the outer wrap to the 760px frame (not 1200). */
.article-featured.issue-featured-wrap:has(.is-portrait) {
  width: min(var(--article-content-width, 760px), calc(100vw - 48px)) !important;
  max-width: var(--article-content-width, 760px) !important;
}

/* SP landscape only: edge-to-edge FI. Portrait keeps guttered 4:5. */
@media (max-width: 768px) {
  .article-featured.issue-featured-wrap:has(.is-landscape),
  .article-featured.issue-featured-wrap:has(.wp-block-post-featured-image:not(.is-portrait)) {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
  }
}

/*
 * SP only: 画像ブロック「幅広（alignwide）」= フルブリード（alignfull 相当）。
 * Article / 固定ページ共通（.content-body）。PC は theme wide-size（1200）のまま。
 */
@media (max-width: 768px) {
  .content-body .wp-block-image.alignwide {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    box-sizing: border-box !important;
  }

  .content-body .wp-block-image.alignwide img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Header chrome + body chrome share --article-content-width. */
.article-template .article-series-meta,
.article-template .article-main .wp-block-post-title,
.article-template .article-byline {
  width: min(var(--article-content-width), calc(100vw - 48px)) !important;
  max-width: var(--article-content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.article-template .article-series-meta {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

.article-template .article-main .wp-block-post-title {
  text-align: left !important;
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}

.article-template .article-byline {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 40px !important;
  --wp--style--block-gap: 0 !important;
  /* Title ↔ byline hierarchy: light rule (PC + SP). */
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  padding-top: 12px !important;
}

/* Continued pages (<!--nextpage--> page 2+): skip hero, compact chrome. */
.article-template.article-continued .article-featured {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.article-template.article-continued .article-series-meta {
  margin-top: 24px !important;
  margin-bottom: 6px !important;
  gap: 8px !important;
}

.article-template.article-continued .article-series-meta .issue-column-title .value,
.article-template.article-continued .article-series-meta .issue-column-number .value {
  font-size: 14px !important;
  line-height: 1.3 !important;
}

.article-template.article-continued .article-main .wp-block-post-title {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem) !important;
  line-height: 1.35 !important;
  margin-bottom: 10px !important;
}

.article-template.article-continued .article-byline {
  margin-bottom: 20px !important;
}

.article-template.article-continued .article-byline__author,
.article-template.article-continued .article-byline__author .wp-block-post-author-name,
.article-template.article-continued .article-byline__author a {
  font-size: 14px !important;
  line-height: 1.3 !important;
}

.article-template.article-continued .article-byline--interview .article-byline__author,
.article-template.article-continued .article-byline--contribution .article-byline__author {
  font-size: 15px !important;
  font-weight: 700 !important;
}

.article-template.article-continued .article-byline__credit {
  font-size: 13px !important;
}

.article-template.article-continued .article-byline__date {
  font-size: 12px !important;
}

/* In-content page links (wp_link_pages) — 配置のみ。正円は components 共通。 */
.article-template .content-body .post-nav-links.article-page-links,
.article-template .content-body .post-nav-links {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--trails-pag-gap, 12px) !important;
  width: min(var(--article-content-width), 100%) !important;
  max-width: var(--article-content-width) !important;
  margin: 40px auto 16px !important;
  padding: 24px 0 8px !important;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  box-sizing: border-box !important;
  text-align: center !important;
  line-height: 1 !important;
}

@media (min-width: 601px) {
  .article-template .content-body .post-nav-links.article-page-links,
  .article-template .content-body .post-nav-links {
    margin-top: 48px !important;
    padding-top: 28px !important;
  }
}

@media (max-width: 768px) {
  .article-template .content-body .post-nav-links.article-page-links,
  .article-template .content-body .post-nav-links {
    gap: var(--trails-pag-gap, 6px) !important;
  }
}

.article-template .article-byline__author {
  order: 1;
  margin: 0 !important;
  text-align: left !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 400 !important;
}

.article-template .article-byline__credit {
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
}

.article-template .article-byline__brand {
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 400 !important;
}

.article-template .article-byline__author .wp-block-post-author-name,
.article-template .article-byline__author a {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  text-decoration: none !important;
  color: inherit;
}

/* Author name only: quiet until hover (credit prefix / date untouched). */
.article-template .article-byline__author a.wp-block-post-author-name:hover {
  color: #592ba7 !important;
  text-decoration: underline !important;
}

.article-template .article-byline > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Prefixed credits (interview / contribution): emphasize the name. */
.article-template .article-byline--interview .article-byline__author,
.article-template .article-byline--contribution .article-byline__author {
  font-size: 18px !important;
  font-weight: 700 !important;
}

.article-template .article-byline--interview .article-byline__credit,
.article-template .article-byline--contribution .article-byline__credit {
  font-size: 15px !important;
  font-weight: 400 !important;
}

.article-template .article-byline__date {
  order: 2;
  margin: 0 0 0 auto !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
  text-align: right !important;
  opacity: 0.7;
}

/* wpautop may wrap the date; keep it as the right-side flex item. */
.article-template .article-byline > p:has(.article-byline__date) {
  order: 2;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
}

.article-closing {
  margin-top: 24px;
}

.article-template .article-closing > .wp-block-group,
.article-template .article-closing > .issue-profile {
  width: min(var(--article-content-width), calc(100vw - 48px)) !important;
  max-width: var(--article-content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.article-closing:empty {
  display: none !important;
  margin: 0 !important;
}

/* Closing CTAs: quiet text nav (Article only; not WP button blocks). */
.article-template .article-closing-nav {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: stretch !important;
  width: min(var(--article-content-width), calc(100vw - 48px)) !important;
  max-width: var(--article-content-width) !important;
  margin: 28px auto 0 !important;
  padding: 0 20px !important;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  box-sizing: border-box !important;
  background: transparent !important;
}

.article-template .article-closing-nav__link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 15px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 16.5px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

.article-template .article-closing-nav__link:hover,
.article-template .article-closing-nav__link:focus-visible {
  text-decoration: none !important;
  background: transparent !important;
  color: inherit !important;
  opacity: 0.72;
}

.article-template .article-closing-nav__sep {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
  font-size: 16.5px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  color: inherit !important;
  opacity: 0.55;
  user-select: none;
}

/* Issue series pager (contribution + multi-episode only). */
.article-template .article-series-pager {
  width: min(var(--article-content-width), calc(100vw - 48px)) !important;
  max-width: var(--article-content-width) !important;
  margin: 32px auto 0 !important;
  padding: 16px 0 30px !important;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 6px 16px;
  align-items: start;
}

.article-template .article-series-pager__prev {
  text-align: left;
}

.article-template .article-series-pager__series {
  text-align: center;
  align-self: center;
}

.article-template .article-series-pager__next {
  text-align: right;
}

.article-template .article-series-pager__link {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none !important;
  color: inherit;
  max-width: 100%;
  line-height: 1.25 !important;
}

.article-template .article-series-pager__link br {
  display: none !important;
}

.article-template .article-series-pager__dir {
  display: block;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 400 !important;
  opacity: 0.65;
  letter-spacing: 0.04em;
  margin: 0 !important;
  padding: 0 !important;
}

.article-template .article-series-pager__num {
  display: block;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.article-template .article-series-pager__series-title {
  display: inline-block;
  font-size: 18px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  opacity: 1;
}

/* Podcast / Event center archive link only (Issue center stays span).
 * No underline — match global link style (theme.json elements.link). */
.article-template a.article-series-pager__series-title,
.article-template a.article-series-pager__series-title:hover {
  color: #592ba7 !important;
  text-decoration: none !important;
}

.article-template a.article-series-pager__link:hover .article-series-pager__num {
  text-decoration: underline;
}

.article-template .article-series-pager + .article-closing {
  margin-top: 24px;
}

/*
 * When the series pager is present, its bottom border is the divider.
 * Hide the reusable-block spacer + separator that would create a double line.
 * Guest (no pager) keeps the profile separator above closing.
 */
.article-template .article-series-pager + .article-closing > .wp-block-group > .wp-block-spacer:first-child,
.article-template .article-series-pager + .article-closing .wp-block-separator {
  display: none !important;
  margin: 0 !important;
  height: 0 !important;
}

@media (max-width: 600px) {
  .article-template .article-series-pager {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 24px !important;
    padding: 14px 0 26px !important;
  }

  .article-template .article-series-pager__series {
    grid-column: 1 / -1;
    grid-row: 1;
    order: 0;
  }

  .article-template .article-series-pager__series-title {
    font-size: 16px !important;
  }

  .article-template .article-series-pager__prev {
    grid-column: 1;
    grid-row: 2;
  }

  .article-template .article-series-pager__next {
    grid-column: 2;
    grid-row: 2;
  }

  .article-template .article-series-pager__link {
    gap: 5px;
  }
}
