@media (max-width: 551px) {
	#commonHeader{
	background-image: url("https://www.motenashi-toilet.com/wp-content/uploads/2026/09/header_v5.webp");

	}
	.d--header-layout1 #commonHeaderInner {
	padding-bottom: 14px;
	}
}

#globalMenuList .menu-item a:hover {
	color: #008cc9 !important;
}

/* 検索ボックス */
.d--material-design .wp-block-search__button-outside .wp-block-search__inside-wrapper .wp-block-search__input {
  border: 2px solid #4bb1dd;
  padding: 15px 25px;
  border-radius: 4px;
  box-shadow:none;
  background-color: #fff;
}

.d--flat-design .wp-block-search__inside-wrapper, .d--material-design .wp-block-search__inside-wrapper {
	height: 58px !important;
}

/* パーツ用CSS */
.border-radius {
	border-radius: 4px;
}
.padding-custom {
	padding: 2em 0.5em !important;
}
.margin-0 {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
.mt-0 {
	margin-top: 0 !important;
}
.mt-4rem {
	margin-top: 4rem !important;
}
.mb-0 {
	margin-bottom: 0 !important;
}
.mb-10 {
	margin-bottom: 10px !important;
}

/* 比較用ブロック */
.b--jinr-compare .o--compare-child .c--compare-label {
	top: -27px !important;
}

.b--jinr-compare .o--compare-child .c--compare-content .a--compare-itemname a, .b--jinr-compare .o--compare-child .c--compare-content .a--compare-itemname a:hover {
	color: #008cc9 !important;
}
 
.b--jinr-compare {
	margin-bottom: 1rem !important;
	scrollbar-gutter: stable;
	padding-bottom: 10px;
}

.b--jinr-compare .o--compare-child .c--compare-content .a--compare-link {
	padding-top: 75% !important;
}
.b--jinr-compare .o--compare-child .c--compare-content {
	padding: 16px !important;
}
.b--jinr-compare .o--compare-child .c--compare-content .a--compare-image {
	border-radius: 4px;
}

/* TOKYO TOILETで使用 */
.mt-0.narrow-compare-box .b--jinr-compare  {
	padding-top: 0;
}

/* 比較用ブロックv2 */
.compare-box_portrait {
	border: 1px solid #11111126;
	min-height: auto !important;
}

.compare-box_portrait .wp-block-columns {
	margin-top: 1.5rem;
	margin-bottom: 0;
	column-gap: 1em;
	justify-content: space-between;
}

.compare-box_portrait figure {
	font-size: 0;
}
.compare-box_portrait_main-ttl {
	margin-block: 0 !important;
	padding-top: 0 !important;
	padding-inline: 3px !important;
	line-height: 1.2;
  border-bottom-width: 2px;
  border-bottom-style: solid;
	border-color: #008cc9;
	background-color: inherit !important;
	color: #008cc9 !important;
}

.compare-box_portrait_main-ttl a {
	color: #008cc9 !important;
}
.compare-box_portrait_sub-ttl {
	background-color: inherit !important;
	padding-inline: 0 !important;
	padding-block: clamp(9px, 2.4vw, 12px);
}

.compare-box_portrait h4.wp-block-heading + p {
	margin-block: 0.75em !important;
	line-height: 1.25em !important;
}

/* トイレの特徴を示す画像の下のキャプションを調整 */
#postContent .wp-block-image .wp-element-caption {
	font-size: 1.1rem;
	letter-spacing: 0.01rem;
	line-height: 1.5;
	font-weight: 600;
}

#postContent .wp-block-image.text-blue .wp-element-caption {
	color: #4bb1dd;
}

/* トイレの総合評価のブロック間隔を調整 */
.flex-gap {
	gap: 20px;
}

/* Simply Gallery Blockのスマートフォン向け画像表示を調整 */
/* スマートフォン用 */
@media (max-width: 767px) {
	.pgcsimplygalleryblock-slider-content, div .pgcsimplygalleryblock-slider-main-wrap {
		padding: 0 !important;
	}
	
	 .pgcsimplygalleryblock-slider-collection {
    height: 360px !important;
  }
	
  .pgcsimplygalleryblock-slider-collection .pgcsimplygalleryblock-slider-item-wrap > img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    left: 0 !important;
    top: 0 !important;
    object-fit: cover !important;
  }

  .pgcsimplygalleryblock-slider-collection .pgcsimplygalleryblock-slider-slider-view {
    height: 300px !important;
  }
}

/* =========================
  トイレ案内図 凡例
========================= */
.mt-toilet-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 20px;
  width: 100%;
  padding: 22px 24px;
  margin: 0;
  background: #f3f6f8;
  border-radius: 4px;
}

.mt-legend-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
}

.mt-legend-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  justify-self: center;
  align-self: center;
}

.mt-legend-icon img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.mt-legend-text {
  min-width: 0;
}

.mt-legend-text strong {
  display: block;
  margin: 0;
  color: #111;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  white-space: nowrap;
}

.mt-legend-text span {
  display: block;
  margin-top: 1px;
  color: #333;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

/* パソコンで横幅がやや狭い場合は3列にして折り返しを防止 */
@media (max-width: 1100px) {
  .mt-toilet-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* スマホ：3列表示。長い項目名も改行しない */
@media (max-width: 767px) {
  .mt-toilet-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 6px;
    row-gap: 8px;
    padding: 10px 8px;
    border-radius: 3px;
  }

  .mt-legend-item {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 4px;
    align-items: center;
  }

  .mt-legend-icon {
    width: 28px;
    height: 28px;
    justify-self: center;
    align-self: center;
  }

  .mt-legend-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    object-position: center;
  }

  .mt-legend-text strong {
    font-size: 8.5px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .mt-legend-text span {
    margin-top: 0;
    font-size: 6.5px;
    line-height: 1.05;
    white-space: nowrap;
  }
}

/* 画面幅がかなり狭い端末でも3列を維持 */
@media (max-width: 380px) {
  .mt-toilet-legend {
    column-gap: 4px;
    row-gap: 8px;
    padding: 9px 6px;
  }

  .mt-legend-item {
    grid-template-columns: 25px minmax(0, 1fr);
    column-gap: 3px;
  }

  .mt-legend-icon,
  .mt-legend-icon img {
    width: 25px;
    height: 25px;
  }

  .mt-legend-text strong {
    font-size: 7.5px;
  }

  .mt-legend-text span {
    font-size: 5.8px;
  }
}

/* =========================
  設備アンカーリンクボタン
========================= */
.motenashi-toilet-anchor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
}

.motenashi-toilet-anchor a {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px 30px;
  border: 1px solid #d7e8ef;
  border-radius: 12px;
  background: transparent;
  color: #173b4d;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: none;
  transform: scale(1);
  transform-origin: center;
  transition: transform .18s ease, border-color .18s ease;
}

.motenashi-toilet-anchor a:hover,
.motenashi-toilet-anchor a:focus-visible {
  background: transparent;
  border-color: #63bddb;
  box-shadow: none;
  transform: scale(1.018);
  outline: none;
}

/* 下方向へ移動することを示す矢印 */
.motenashi-toilet-anchor a::after {
  content: "›";
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%) rotate(90deg);
  color: #74818a;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.motenashi-toilet-anchor img {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  object-fit: contain;
  flex: 0 0 auto;
  transform: none !important;
  transition: none !important;
}

.motenashi-toilet-anchor a:hover img,
.motenashi-toilet-anchor a:focus-visible img {
  transform: none !important;
}

.motenashi-toilet-anchor .label {
  min-width: 0;
  font-size: 14px;
  text-align: left;
  word-break: keep-all;
}

/* スマホでも3つ横一列 */
@media (max-width: 600px) {
  .motenashi-toilet-anchor {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .motenashi-toilet-anchor a {
    flex-direction: column;
    gap: 6px;
    padding: 8px 4px 26px;
    border-radius: 10px;
    text-align: center;
  }

  .motenashi-toilet-anchor a::after {
    bottom: 5px;
    font-size: 18px;
  }

  .motenashi-toilet-anchor img {
    width: 44px;
    height: 44px;
  }

  .motenashi-toilet-anchor .label {
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
  }
}

/* バリアフリー設備 */
.motenashi-barrierfree-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* 各項目 */
.motenashi-barrierfree-item {
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: #f2f9fd;
  border-radius: 5px;
  color: #172b3a;
}

/* JIN:R チェックアイコン */
.motenashi-barrierfree-check {
  flex: 0 0 auto;
  width: 25px;
  color: #149edf;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

/* JIN:R ×アイコン */
.motenashi-barrierfree-cross {
  flex: 0 0 auto;
  width: 25px;
  color: #9eabb5;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

/* 項目名 */
.motenashi-barrierfree-name {
  min-width: 0;
  color: #172b3a;
  font-size: 0.9em;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
}

/* 設置なし */
.motenashi-barrierfree-item.is-none {
  background: #f4f5f6;
}

.motenashi-barrierfree-item.is-none .motenashi-barrierfree-name {
  color: #53626c;
}

/* スクリーンリーダー用 */
.motenashi-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* スマホ：1行2項目 */
@media (max-width: 767px) {

  .motenashi-barrierfree-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .motenashi-barrierfree-item {
    min-height: 50px;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 4px;
  }

  .motenashi-barrierfree-check,
  .motenashi-barrierfree-cross {
    width: 20px;
    font-size: 18px;
  }

  .motenashi-barrierfree-name {
    font-size: 0.92em;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: normal;
  }
}

/* かなり狭いスマホ */
@media (max-width: 380px) {
  .motenashi-barrierfree-item {
    gap: 6px;
    padding: 8px 7px;
  }
  .motenashi-barrierfree-check,
  .motenashi-barrierfree-cross {
    width: 18px;
    font-size: 17px;
  }
}

/* =========================
  バリアフリートイレ H4
========================= */
/* 元の縦線をグリーンに */
h4.jinr-heading.motenashi-heading-accessible {
  border-left-color: #2ca45c !important;
}

/* JIN:Rが疑似要素で縦線を表示している場合にも対応 */
h4.jinr-heading.motenashi-heading-accessible::before {
  background-color: #2ca45c !important;
  border-color: #2ca45c !important;
}

/* アイコンとタイトルを横並び */
h4.motenashi-heading-accessible .motenashi-h4-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

/* バリアフリートイレ アイコン */
h4.motenashi-heading-accessible .motenashi-h4-icon {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* タイトル */
h4.motenashi-heading-accessible .motenashi-h4-text {
  white-space: nowrap;
  line-height: 1.4;
}

/* =========================
  女性用トイレ H4
========================= */
/* 元の縦線をピンクに */
h4.jinr-heading.motenashi-heading-women {
  border-left-color: #e84f7f !important;
}

/* JIN:Rが疑似要素で縦線を表示している場合にも対応 */
h4.jinr-heading.motenashi-heading-women::before {
  background-color: #e84f7f !important;
  border-color: #e84f7f !important;
}

/* アイコンとタイトルを横並び */
h4.motenashi-heading-women .motenashi-h4-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

/* 女性用トイレ アイコン */
h4.motenashi-heading-women .motenashi-h4-icon {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* タイトル */
h4.motenashi-heading-women .motenashi-h4-text {
  white-space: nowrap;
  line-height: 1.4;
}

/* =========================
  男性用トイレ H4
========================= */
/* 男性用見出しの装飾をブルーに */
h4.jinr-heading.motenashi-heading-men {
  border-left-color: #149edf !important;
}

h4.jinr-heading.motenashi-heading-men::before {
  background-color: #149edf !important;
  border-color: #149edf !important;
}

/* アイコンとタイトルを横並び */
h4.motenashi-heading-men .motenashi-h4-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

/* 男性用トイレ アイコン */
h4.motenashi-heading-men .motenashi-h4-icon {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* タイトル */
h4.motenashi-heading-men .motenashi-h4-text {
  white-space: nowrap;
  line-height: 1.4;
}

/* =========================================================
   もてなしトイレ：設備一覧 共通コンポーネント

   PC：3列
   SP：2列

   カラー
   バリアフリー：#2ca45c
   女性用：#e84f7f
   男性用：#149edf
========================================================= */


/* =========================================================
   1. 種類別カラー
========================================================= */

.motenashi-equipment-grid--accessible {
  --motenashi-equipment-color: #2ca45c;
}

.motenashi-equipment-grid--women {
  --motenashi-equipment-color: #e84f7f;
}

.motenashi-equipment-grid--men {
  --motenashi-equipment-color: #149edf;
}


/* =========================================================
   2. グリッド
========================================================= */

.motenashi-equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  column-gap: 24px;
  row-gap: 8px;

  width: 100%;
  margin: 0;
  padding: 0;
}


/* =========================================================
   3. 各設備
========================================================= */

.motenashi-equipment-item {
  display: flex;
  align-items: center;

  min-width: 0;
  min-height: 34px;

  margin: 0;
  padding: 0;

  background: transparent;
  border: 0;
  border-radius: 0;

  box-sizing: border-box;
}


/* =========================================================
   4. チェック・×
   丸背景なし
========================================================= */

.motenashi-equipment-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 20px;

  width: 20px;
  height: 20px;

  margin: 0 10px 0 0;
  padding: 0;

  background: transparent !important;
  border: 0;
  border-radius: 0;

  box-sizing: border-box;

  font-size: 18px !important;
  line-height: 1;
  text-align: center;
}


/* JIN:Rアイコン位置調整 */
.motenashi-equipment-status::before {
  display: block;

  font-size: 18px !important;
  line-height: 1;

  transform: translateY(0.5px);
}


/* =========================================================
   5. 設置あり
========================================================= */

.motenashi-equipment-status.is-available,
.motenashi-equipment-status.is-available::before {
  color: var(--motenashi-equipment-color) !important;
}


/* =========================================================
   6. 設置なし
========================================================= */

.motenashi-equipment-status.is-unavailable,
.motenashi-equipment-status.is-unavailable::before {
  color: #9eabb5 !important;
}


/* =========================================================
   7. 設備名
========================================================= */

.motenashi-equipment-name {
  min-width: 0;

  color: #172b3a;

  font-size: 17px !important;
  font-weight: 400;
  line-height: 1.4;

  letter-spacing: 0;
  white-space: nowrap;
}


/* 長い設備名
   PCでは通常文字と同じ17px
========================================================= */

.motenashi-equipment-name.is-long {
  font-size: 17px !important;
  font-weight: 400;
  line-height: 1.4;

  letter-spacing: 0;
}


/* =========================================================
   8. 2行表示する設備名
========================================================= */

.motenashi-equipment-name.is-multiline {
  font-size: 15px !important;
  font-weight: 400;
  line-height: 1.2 !important;

  letter-spacing: 0;
  white-space: nowrap;
}


/* =========================================================
   9. 設置なしの文字
========================================================= */

.motenashi-equipment-item.is-none
.motenashi-equipment-name {
  color: #53626c;
  font-weight: 400;
}


/* =========================================================
   10. スクリーンリーダー用
========================================================= */

.motenashi-sr-only {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  padding: 0 !important;
  margin: -1px !important;

  overflow: hidden !important;

  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;

  border: 0 !important;
}


/* =========================================================
   スマートフォン
========================================================= */

@media screen and (max-width: 767px) {

  /* 2列 */
  .motenashi-equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    column-gap: 10px;
    row-gap: 7px;
  }


  /* 各設備 */
  .motenashi-equipment-item {
    min-height: 32px;
  }


  /* チェック・× */
  .motenashi-equipment-status {
    flex-basis: 20px;

    width: 20px;
    height: 20px;

    margin-right: 8px;

    font-size: 18px !important;
  }

  .motenashi-equipment-status::before {
    font-size: 18px !important;
  }


  /* 通常文字 */
  .motenashi-equipment-name {
    font-size: 17px !important;
    line-height: 1.35;

    letter-spacing: 0;
  }


  /* 長い項目だけスマホでは少し小さく */
  .motenashi-equipment-name.is-long {
    font-size: 15px !important;
    line-height: 1.3;

    letter-spacing: -0.01em;
  }


  /* 2行項目 */
  .motenashi-equipment-name.is-multiline {
    font-size: 14px !important;
    line-height: 1.15 !important;

    letter-spacing: 0;
  }

}

/* ========================================
   トイレ ワンポイント：淡色バージョン
   comment.css の代わりに使用（既存のクラス名のまま利用可能）
======================================== */

/* 種類ごとの配色 */
.motenashi-accessible-comment {
  --motenashi-comment-background: #dff1e7;
  --motenashi-comment-accent: #2ca45c;
}

.motenashi-women-comment {
  --motenashi-comment-background: #fce5ec;
  --motenashi-comment-accent: #e84f7f;
}

.motenashi-men-comment {
  --motenashi-comment-background: #e0f0f7;
  --motenashi-comment-accent: #339ecc;
}

/* 共通スタイル（外側の余白はバリアフリートイレに統一） */
.motenashi-accessible-comment,
.motenashi-women-comment,
.motenashi-men-comment {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;

  width: fit-content;
  max-width: 100%;
  margin: 54px 0 -10px;
  padding: 11px 16px;

  background: var(--motenashi-comment-background);
  border: 1px solid var(--motenashi-comment-accent);
  border-radius: 5px;

  color: #243746;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

/* 吹き出しの三角 */
.motenashi-accessible-comment::before,
.motenashi-women-comment::before,
.motenashi-men-comment::before {
  content: "";
  position: absolute;
  left: 23px;
  bottom: -10px;

  width: 0;
  height: 0;

  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--motenashi-comment-accent);
}

.motenashi-accessible-comment::after,
.motenashi-women-comment::after,
.motenashi-men-comment::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -8px;

  width: 0;
  height: 0;

  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid var(--motenashi-comment-background);
}

/* JIN:R スピーカーアイコン */
.motenashi-accessible-comment .jin-icons,
.motenashi-women-comment .jin-icons,
.motenashi-men-comment .jin-icons {
  display: inline-block;
  flex: 0 0 24px;
  width: 24px;

  color: var(--motenashi-comment-accent);
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

/* コメント */
.motenashi-accessible-comment-text,
.motenashi-women-comment-text,
.motenashi-men-comment-text {
  color: #243746;
}

@media (max-width: 600px) {
  .motenashi-accessible-comment,
  .motenashi-women-comment,
  .motenashi-men-comment {
    gap: 9px;
    margin: 42px 0 -16px;
    padding: 10px 13px;
    font-size: 14px;
    line-height: 1.55;
  }

  .motenashi-accessible-comment .jin-icons,
  .motenashi-women-comment .jin-icons,
  .motenashi-men-comment .jin-icons {
    flex-basis: 22px;
    width: 22px;
    font-size: 20px;
  }
}
/* 3個のアンカーリンク：国立競技場（455）・靖国神社（6001）
   対象記事のアンカーリンクだけに適用します。 */
body:is(.postid-455, .postid-6001) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  container-type: inline-size;
}

body:is(.postid-455, .postid-6001) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) > .b--jinr-button {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

body:is(.postid-455, .postid-6001) .b--jinr-button:has(a:is([href="#a01"], [href="#a02"], [href="#a03"])) .a--button-hover {
  display: block;
  width: 100%;
}

body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"]) {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 60px;
  padding: 14px 32px 14px 12px;
  border: 1px solid #4bb1dd;
  border-radius: 5px;
  font-size: clamp(12px, 1.65cqi, 16px);
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
}

body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"]) > span {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"]) > span > .jinr-d--font-size {
  flex: 0 0 auto;
  font-size: 1.4em !important;
  line-height: 1;
}

body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"])::after {
  right: 12px;
}

/* PC：番号と文言を中央に配置し、右側の余白と文字サイズを調整します。 */
@media (min-width: 961px) {
  body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"]) {
    justify-content: center;
    padding: 12px 26px 12px 12px;
    font-size: clamp(12px, 1.9cqi, 16px);
    text-align: center;
  }

  body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"]) > span {
    gap: 6px;
  }

  body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"])::after {
    right: 10px;
  }
}

/* JIN:RのPC表示境界（961px）に合わせ、画面幅で3列／3行を切り替えます。 */
@media (max-width: 960px) {
  body:is(.postid-455, .postid-6001) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) {
    grid-template-columns: minmax(0, 1fr);
  }

  body:is(.postid-455, .postid-6001) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) > .b--jinr-button {
    grid-column: 1 / -1;
  }

  body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"]) {
    padding: 16px 42px 16px 18px;
    font-size: clamp(13px, 4.2cqi, 16px);
  }

  body:is(.postid-455, .postid-6001) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"])::after {
    right: 18px;
  }
}

/* 渋谷ヒカリエ（7747）：PCは3列×2行、スマホは縦並び */
body.postid-7747 .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  container-type: inline-size;
}

body.postid-7747 .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) > .b--jinr-button {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

body.postid-7747 .b--jinr-button:has(a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"])) .a--button-hover {
  display: block;
  width: 100%;
  height: 100%;
}

body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"]) {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 60px;
  height: 100%;
  padding: 14px 32px 14px 12px;
  border: 1px solid #4bb1dd;
  border-radius: 5px;
  font-size: clamp(12px, 1.65cqi, 16px);
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
}

body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"]) > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"]) > span > .jinr-d--font-size {
  flex: 0 0 auto;
  font-size: 1.4em !important;
  line-height: 1;
}

body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"])::after {
  right: 12px;
}

/* PC：番号と文言を中央に配置し、右側の余白と文字サイズを調整します。 */
@media (min-width: 961px) {
  body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"]) {
    justify-content: center;
    padding: 12px 26px 12px 12px;
    font-size: clamp(12px, 1.9cqi, 16px);
    text-align: center;
  }

  body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"]) > span {
    gap: 6px;
  }

  body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"])::after {
    right: 10px;
  }
}

/* JIN:RのPC表示境界（961px）に合わせ、画面幅で3列／縦並びを切り替えます。 */
@media (max-width: 960px) {
  body.postid-7747 .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.postid-7747 .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) > .b--jinr-button {
    grid-column: 1 / -1;
  }

  body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"]) {
    padding: 16px 42px 16px 18px;
    font-size: clamp(13px, 4.2cqi, 16px);
  }

  body.postid-7747 .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"], [href="#a05"], [href="#a06"])::after {
    right: 18px;
  }
}

body.postid-7747 .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) > .b--jinr-button > .o--button-inner {
  height: 100%;
}

/* 2個・4個のアンカーリンク：公開13記事（PCは2列、4個は2行） */
@media (min-width: 961px) {
  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    container-type: inline-size;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) > .b--jinr-button {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button:has(a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"])) .o--button-inner,
  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button:has(a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"])) .a--button-hover {
    display: block;
    width: 100%;
    height: 100%;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"]) {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 60px;
    padding: 12px 26px 12px 12px;
    border: 1px solid #4bb1dd;
    border-radius: 5px;
    font-size: clamp(12px, 1.9cqi, 16px);
    line-height: 1.5;
    letter-spacing: 0;
    text-align: center;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"]) > span {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"])::after {
    right: 10px;
  }
}

/* 2個・4個のアンカーリンク：スマホ・タブレットでは1列 */
@media (max-width: 960px) {
  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    container-type: inline-size;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .wp-block-group.is-layout-grid:has(> .b--jinr-button a[href="#a01"]) > .b--jinr-button {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button:has(a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"])) .o--button-inner,
  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button:has(a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"])) .a--button-hover {
    display: block;
    width: 100%;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"]) {
    position: relative;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 60px;
    padding: 16px 42px 16px 18px;
    border: 1px solid #4bb1dd;
    border-radius: 5px;
    font-size: clamp(13px, 4.2cqi, 16px);
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"]) > span {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body:is(.postid-485, .postid-1100, .postid-1151, .postid-1397, .postid-2579, .postid-2617, .postid-2790, .postid-4437, .postid-6276, .postid-7229, .postid-7404, .postid-3940, .page-id-6485) .b--jinr-button a:is([href="#a01"], [href="#a02"], [href="#a03"], [href="#a04"])::after {
    right: 18px;
  }
}

/* 水道橋駅周辺：アンカー直前の段落の負の余白を解除 */
body.postid-2790 #postContent > p:has(+ .wp-block-group.is-layout-grid > .b--jinr-button a[href="#a01"]) {
  margin-bottom: 24px !important;
}
