/* =========================================================
   ANCHOR 固定ページデザインテンプレート
   3.7.9: ご相談の流れ本文を白背景内の視覚中央へ調整
   ========================================================= */
.anchor-fixed-page{
  --anchor-page-border: var(--anchor-fixed-page-border, var(--color-accent-border));
  --anchor-page-surface: var(--anchor-fixed-page-surface, var(--service-card-bg, #fff));
  --anchor-page-soft: var(--anchor-fixed-page-soft, var(--color-accent-soft));
  --anchor-page-emphasis: var(--anchor-fixed-page-emphasis, var(--color-accent-soft));
  --anchor-page-primary: var(--color-primary);
  --anchor-page-primary-dark: var(--color-primary-dark);
  --anchor-page-text: var(--anchor-fixed-page-text, var(--color-text-base));
  --anchor-page-heading: var(--anchor-fixed-page-heading, var(--color-text-heading));
  --anchor-page-section-gap: clamp(34px, calc(var(--anchor-section-spacing, 80px) * .72), 96px);
  --anchor-page-component-gap: clamp(16px, calc(var(--anchor-grid-gap, 24px) * 1), 48px);

  width: 100%;
  max-width: var(--anchor-content-narrow, 860px);
  margin-inline: auto;
  color: var(--anchor-page-text);
  font-size: var(--anchor-body-size, 16px);
  line-height: var(--anchor-body-line-height, 1.8);
}

.anchor-fixed-page > * + *{
  margin-top: clamp(24px, calc(var(--anchor-section-spacing, 80px) * .46), 58px);
}

.anchor-fixed-page :where(p,li,td,th){
  line-height: var(--anchor-body-line-height, 1.8);
}

.anchor-fixed-page :where(h2,h3,h4){
  color: var(--anchor-page-heading);
  font-weight: var(--anchor-heading-weight, 700);
  letter-spacing: var(--anchor-heading-letter-spacing, 0em);
}

/* ---------- 導入・小見出し ---------- */
.anchor-fixed-page__lead{
  max-width: min(100%, var(--anchor-content-narrow, 860px));
  margin-inline: auto;
  font-size: clamp(1.06rem, 1.6vw, 1.3rem);
  font-weight: var(--anchor-heading-weight, 700);
  line-height: 1.9 !important;
  color: var(--anchor-page-heading);
}

.anchor-fixed-page__eyebrow{
  display: inline-block;
  margin: 0 0 10px !important;
  padding: 4px 9px;
  border: 1px solid var(--anchor-page-border);
  border-radius: var(--radius-s, 8px);
  background: var(--anchor-page-soft);
  color: var(--anchor-page-primary-dark);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.anchor-fixed-page__section{
  padding-top: clamp(4px, calc(var(--anchor-section-spacing, 80px) * .12), 18px);
}

/* 見出しはPHP側で生成した状態トークンを使い、エディターでも同じ見た目にする */
.anchor-fixed-page__section-title{
  position: relative;
  margin: var(--anchor-page-section-gap) 0 clamp(20px, calc(var(--anchor-grid-gap, 24px) * 1.2), 36px);
  padding: var(--anchor-fixed-heading-padding, 0 0 12px 0);
  border: 0;
  border-bottom: var(--anchor-fixed-heading-border-bottom, 0 solid transparent);
  border-radius: var(--anchor-fixed-heading-radius, 0);
  background: var(--anchor-fixed-heading-background, transparent);
  color: var(--anchor-page-heading);
  font-size: var(--h2-size, 24px);
  line-height: var(--h2-lh, 1.5);
  text-align: var(--anchor-fixed-heading-text-align, left);
}

.anchor-fixed-page__section-title::before,
.anchor-fixed-page__section-title::after{
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  background: var(--anchor-page-primary);
  pointer-events: none;
}

.anchor-fixed-page__section-title::before{
  left: var(--anchor-fixed-heading-before-left, 0);
  top: var(--anchor-fixed-heading-before-top, 0);
  bottom: var(--anchor-fixed-heading-before-bottom, auto);
  width: var(--anchor-fixed-heading-before-width, 0);
  height: var(--anchor-fixed-heading-before-height, 0);
  transform: var(--anchor-fixed-heading-before-transform, none);
}

.anchor-fixed-page__section-title::after{
  left: var(--anchor-fixed-heading-after-left, 0);
  top: var(--anchor-fixed-heading-after-top, auto);
  bottom: var(--anchor-fixed-heading-after-bottom, 0);
  width: var(--anchor-fixed-heading-after-width, 0);
  height: var(--anchor-fixed-heading-after-height, 0);
  transform: var(--anchor-fixed-heading-after-transform, none);
}

.anchor-fixed-page__info-box .anchor-fixed-page__section-title{
  margin-top: 0;
}

/* ---------- 画像 ---------- */
.anchor-fixed-page__gallery{
  gap: var(--anchor-page-component-gap);
  margin-bottom: clamp(28px, calc(var(--anchor-section-spacing, 80px) * .62), 64px);
}

.anchor-fixed-page__image,
.anchor-fixed-page__profile-image{
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: var(--anchor-radius-image, var(--radius-m));
  background: var(--anchor-page-soft);
}

.anchor-fixed-page__image img,
.anchor-fixed-page__profile-image img{
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: inherit;
  object-fit: cover;
}

/* ---------- 共通サーフェス ---------- */
.anchor-fixed-page__card,
.anchor-fixed-page__detail-item,
.anchor-fixed-page__flow-body,
.anchor-fixed-page__table,
.anchor-fixed-page__info-box,
.anchor-fixed-page__note,
.anchor-fixed-page__form-placeholder{
  border: var(--anchor-fixed-card-border-width, var(--anchor-card-border-width, 1px)) solid var(--anchor-page-border);
  border-radius: var(--anchor-radius-card, var(--radius-m));
  background: var(--anchor-page-surface);
  box-shadow: var(--anchor-fixed-card-shadow, var(--anchor-card-shadow, none));
}

.anchor-fixed-page__info-box,
.anchor-fixed-page__note,
.anchor-fixed-page__form-placeholder{
  padding: var(--anchor-card-padding, 28px);
}

.anchor-fixed-page__info-box{
  background: var(--anchor-page-soft);
}

.anchor-fixed-page__note{
  border-left: max(3px, var(--anchor-card-border-width, 1px)) solid var(--anchor-page-primary);
  background: var(--anchor-page-soft);
}

.anchor-fixed-page__note > :last-child,
.anchor-fixed-page__form-placeholder > :last-child{
  margin-bottom: 0;
}

/* ---------- 表 ---------- */
.anchor-fixed-page__table{
  margin-top: clamp(22px, calc(var(--anchor-grid-gap, 24px) * 1.5), 42px);
  overflow-x: auto;
  transform: translateZ(0);
}

.anchor-fixed-page__table table{
  width: 100%;
  min-width: 620px;
  border: 0;
  border-collapse: collapse;
  background: transparent;
}

.anchor-fixed-page__table th,
.anchor-fixed-page__table td{
  padding: clamp(13px, 1.8vw, 19px) clamp(15px, 2.2vw, 22px);
  border: 0;
  border-right: 1px solid var(--anchor-page-border);
  border-bottom: 1px solid var(--anchor-page-border);
  text-align: left;
  vertical-align: top;
}


.anchor-fixed-page__table tr > *:last-child{
  border-right: 0;
}

.anchor-fixed-page__table th{
  background: var(--anchor-page-soft);
  color: var(--anchor-page-heading);
  font-weight: 700;
}

.anchor-fixed-page__price-table thead th{
  background: var(--anchor-page-primary-dark);
  color: var(--anchor-fixed-page-contrast, #fff);
}

.anchor-fixed-page--office .anchor-fixed-page__table table{
  min-width: 0;
}

.anchor-fixed-page--office .anchor-fixed-page__table th{
  width: 28%;
}

/* ---------- プロフィール ---------- */
.anchor-fixed-page__profile-main{
  gap: clamp(28px, calc(var(--anchor-grid-gap, 24px) * 2), 68px);
  margin-bottom: clamp(38px, calc(var(--anchor-section-spacing, 80px) * .8), 78px);
}

.anchor-fixed-page__profile-image img{
  min-height: 380px;
}

.anchor-fixed-page__profile-name{
  margin-bottom: 22px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.45;
}

.anchor-fixed-page__profile-message{
  margin-top: 0;
}

/* ---------- リスト ---------- */
.anchor-fixed-page__check-list,
.anchor-fixed-page__history-list{
  display: grid;
  gap: max(10px, calc(var(--anchor-grid-gap, 24px) * .5));
  margin: 0;
  padding: 0;
  list-style: none;
}

.anchor-fixed-page__check-list li,
.anchor-fixed-page__history-list li{
  position: relative;
  padding-left: 32px;
}

.anchor-fixed-page__check-list li::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: .14em;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--anchor-page-primary);
  color: var(--anchor-fixed-page-contrast, #fff);
  font-size: 12px;
  font-weight: 700;
}

.anchor-fixed-page__history-list li::before{
  content: "";
  position: absolute;
  left: 8px;
  top: .72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--anchor-page-primary);
}

/* ---------- サービスカード ---------- */
/*
 * GutenbergのGroupブロックに付く is-layout-constrained / is-layout-flow と
 * テーマ独自グリッドが競合しないよう、カード一覧のレイアウトをここで確定する。
 * 高さはGrid本来のstretchに任せ、height/min-height:100%は使用しない。
 */
.anchor-fixed-page .anchor-fixed-page__cards{
  --anchor-service-card-columns: 3;
  display: grid !important;
  grid-template-columns: repeat(var(--anchor-service-card-columns), minmax(0, 1fr)) !important;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  align-items: stretch;
  justify-items: stretch;
  width: 100%;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  gap: var(--anchor-grid-gap, 24px);
}

/*
 * WordPressのバージョンや保存時期によってGroupブロックに追加される
 * .wp-block-group__inner-container をレイアウト上だけ透過させる。
 * これにより、カード本体が外側Gridの直接の項目として配置される。
 */
.anchor-fixed-page .anchor-fixed-page__cards > .wp-block-group__inner-container{
  display: contents !important;
}

/* 1件は1列、2件は2列、3件は3列、4件は2列×2行。5件以上は3列を基準にする。 */
.anchor-fixed-page .anchor-fixed-page__cards--count-1{
  --anchor-service-card-columns: 1;
}

.anchor-fixed-page .anchor-fixed-page__cards--count-2,
.anchor-fixed-page .anchor-fixed-page__cards--count-4{
  --anchor-service-card-columns: 2;
}

.anchor-fixed-page .anchor-fixed-page__cards--count-3{
  --anchor-service-card-columns: 3;
}

/*
 * render_blockフィルターが動かない特殊な表示経路でも、
 * :has()対応ブラウザでは既存ページの件数を自動判定する。
 */
.anchor-fixed-page .anchor-fixed-page__cards--services:has(> .anchor-fixed-page__service-card:nth-child(1):last-child),
.anchor-fixed-page .anchor-fixed-page__cards--services:has(> .wp-block-group__inner-container > .anchor-fixed-page__service-card:nth-child(1):last-child){
  --anchor-service-card-columns: 1;
}

.anchor-fixed-page .anchor-fixed-page__cards--services:has(> .anchor-fixed-page__service-card:nth-child(2):last-child),
.anchor-fixed-page .anchor-fixed-page__cards--services:has(> .anchor-fixed-page__service-card:nth-child(4):last-child),
.anchor-fixed-page .anchor-fixed-page__cards--services:has(> .wp-block-group__inner-container > .anchor-fixed-page__service-card:nth-child(2):last-child),
.anchor-fixed-page .anchor-fixed-page__cards--services:has(> .wp-block-group__inner-container > .anchor-fixed-page__service-card:nth-child(4):last-child){
  --anchor-service-card-columns: 2;
}

/*
 * 既にウィザードで生成済みのページには constrained layout が保存されているため、
 * WordPress側のcontentSize・自動マージン・子要素配置を明示的に解除する。
 */
.anchor-fixed-page .anchor-fixed-page__cards > .anchor-fixed-page__card,
.anchor-fixed-page .anchor-fixed-page__cards > .wp-block-group__inner-container > .anchor-fixed-page__card{
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: stretch;
  justify-self: stretch;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.anchor-fixed-page .anchor-fixed-page__service-card{
  position: relative;
  display: flex !important;
  flex-direction: column !important;
}

.anchor-fixed-page .anchor-fixed-page__service-card > *{
  width: auto !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.anchor-fixed-page__card{
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--anchor-card-padding, 28px);
  color: var(--anchor-page-text);
  transform: var(--anchor-fixed-card-transform, none);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.anchor-fixed-page__service-card:hover,
.anchor-fixed-page__service-card:focus-within{
  border-color: var(--anchor-page-primary);
  transform: var(--anchor-fixed-card-hover-transform, none);
  box-shadow: var(--anchor-fixed-card-hover-shadow, var(--anchor-card-shadow, none));
}

.anchor-fixed-page__card-number{
  margin: 0 0 15px !important;
  color: var(--anchor-page-primary-dark);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
}

/*
 * page.css の「固定ページ本文内 h2」や全体の見出し設定に負けないよう、
 * カード見出しだけ余白と視覚サイズを明示的に固定する。
 */
.anchor-fixed-page .anchor-fixed-page__card-title{
  margin: 0 0 14px !important;
  font-size: var(--h3-size, 20px) !important;
  line-height: var(--h3-lh, 1.6) !important;
}

.anchor-fixed-page__card-link{
  margin: auto 0 0 !important;
  padding-top: 14px;
  font-weight: 700;
}

.anchor-fixed-page__card-link a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--anchor-page-primary-dark);
  text-decoration: none;
}

.anchor-fixed-page__card-link a::after{
  content: "→";
  transition: transform .2s ease;
}

.anchor-fixed-page__card-link a:hover::after,
.anchor-fixed-page__card-link a:focus-visible::after{
  transform: translateX(4px);
}

/* ---------- サービス詳細 ---------- */
.anchor-fixed-page__stack{
  display: grid;
  gap: var(--anchor-grid-gap, 24px);
}

.anchor-fixed-page__detail-item{
  position: relative;
  padding: var(--anchor-card-padding, 28px) var(--anchor-card-padding, 28px) var(--anchor-card-padding, 28px) max(76px, calc(var(--anchor-card-padding, 28px) + 52px));
  transform: var(--anchor-fixed-card-transform, none);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.anchor-fixed-page__detail-item:hover{
  border-color: var(--anchor-page-primary);
  transform: var(--anchor-fixed-card-hover-transform, none);
  box-shadow: var(--anchor-fixed-card-hover-shadow, var(--anchor-card-shadow, none));
}

.anchor-fixed-page__detail-number{
  position: absolute;
  left: var(--anchor-card-padding, 28px);
  top: var(--anchor-card-padding, 28px);
  margin: 0 !important;
  color: var(--anchor-page-primary-dark);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: .06em;
}

.anchor-fixed-page__detail-title{
  margin-bottom: 10px;
  font-size: var(--h3-size, 20px);
  line-height: var(--h3-lh, 1.6);
}

/* ---------- 料金・電話案内 ---------- */
.anchor-fixed-page__price-highlight,
.anchor-fixed-page__contact-box{
  padding: clamp(var(--anchor-card-padding, 28px), calc(var(--anchor-section-spacing, 80px) * .55), 58px);
  border-radius: var(--radius-l, 24px);
  background: var(--anchor-page-emphasis);
  text-align: center;
}

.anchor-fixed-page__price-value{
  margin: 0 !important;
  color: var(--anchor-page-heading);
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 800;
  line-height: 1.25 !important;
}

.anchor-fixed-page__price-note,
.anchor-fixed-page__contact-hours{
  margin: 12px 0 0 !important;
  font-size: .95rem;
}

.anchor-fixed-page__contact-phone{
  margin: 0 !important;
  color: var(--anchor-page-primary-dark);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.3 !important;
}

.anchor-fixed-page__contact-phone a{
  color: inherit;
  text-decoration: none;
}

/* ---------- フロー（新規デザイン） ---------- */
.anchor-fixed-page__flow-list,
.anchor-fixed-page__flow-list > .wp-block-group__inner-container{
  display: grid;
  gap: clamp(18px, calc(var(--anchor-grid-gap, 24px) * 1.15), 30px);
}

.anchor-fixed-page__flow-list > .wp-block-group__inner-container{
  max-width: none;
}

.anchor-fixed-page__flow-item{
  position: relative;
  display: grid;
  grid-template-rows: 78px minmax(130px, 1fr);
  width: 100%;
  max-width: none;
  min-height: 214px;
  margin: 0 !important;
  padding: 0 clamp(24px, 3.5vw, 36px);
  border: max(1px, var(--anchor-card-border-width, 1px)) solid var(--anchor-page-border);
  border-radius: var(--radius-l, 24px);
  background:
    linear-gradient(180deg, var(--anchor-page-soft) 0 78px, var(--anchor-page-surface) 78px 100%);
  box-shadow: var(--anchor-card-shadow, none);
  box-sizing: border-box;
  overflow: hidden;
}

.anchor-fixed-page__flow-item::before{
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--anchor-page-primary);
}

/*
 * 保存環境によって flow-item 直下に inner-container が追加されても、
 * 番号と本文カードを外側Gridの直接の項目として扱う。
 */
.anchor-fixed-page__flow-item > .wp-block-group__inner-container{
  display: contents !important;
}

.anchor-fixed-page__flow-number{
  grid-row: 1;
  align-self: center;
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  justify-items: center;
  gap: 2px;
  width: 62px;
  height: 62px;
  min-width: 62px;
  min-height: 62px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--anchor-page-primary);
  color: var(--anchor-fixed-page-contrast, #fff);
  box-shadow: none;
  line-height: 1;
}

.anchor-fixed-page__flow-label{
  margin: 0 !important;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1 !important;
  letter-spacing: .12em;
  text-indent: .12em;
}

.anchor-fixed-page__flow-index{
  margin: 0 !important;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1 !important;
  letter-spacing: .02em;
}

.anchor-fixed-page__flow-body{
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 14px 20px;
  box-sizing: border-box;
}

/* 旧WordPressで inner-container が生成される場合も中央寄せを維持 */
.anchor-fixed-page__flow-body > .wp-block-group__inner-container{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 100%;
}

.anchor-fixed-page__flow-title{
  margin: 0 !important;
  color: var(--anchor-page-primary-dark);
  font-size: var(--h3-size, 20px) !important;
  line-height: var(--h3-lh, 1.6) !important;
}

.anchor-fixed-page__flow-body p{
  margin: 0 !important;
}

.anchor-fixed-page__flow-body > :last-child{
  margin-bottom: 0 !important;
}

/* ---------- CTA・ボタン ---------- */
.anchor-fixed-page__cta{
  margin-top: clamp(54px, calc(var(--anchor-section-spacing, 80px) * 1.05), 104px) !important;
  padding: clamp(34px, calc(var(--anchor-section-spacing, 80px) * .72), 68px) clamp(22px, 5vw, 58px);
  border-radius: var(--radius-l, 24px);
  background: var(--anchor-page-emphasis);
  text-align: center;
}

.anchor-fixed-page__cta-title{
  margin-bottom: 14px;
  font-size: var(--h2-size, 24px);
  line-height: var(--h2-lh, 1.5);
}

.anchor-fixed-page__cta-text{
  max-width: 720px;
  margin: 0 auto 24px !important;
}

.anchor-fixed-page :where(
  .anchor-fixed-page__cta-button .wp-block-button__link,
  form input[type="submit"],
  form button[type="submit"],
  form .wp-block-button__link
){
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--anchor-fixed-button-height, var(--anchor-button-height, 48px));
  padding: var(--anchor-fixed-button-padding, 10px 28px);
  border: var(--anchor-fixed-button-border, 1px solid var(--anchor-page-primary));
  border-bottom: var(--anchor-fixed-button-border-bottom, 1px solid var(--anchor-page-primary));
  border-radius: var(--anchor-fixed-button-radius, var(--anchor-radius-button, 999px));
  background: var(--anchor-fixed-button-background, var(--anchor-page-primary));
  color: var(--anchor-fixed-button-color, #fff);
  box-shadow: var(--anchor-fixed-button-shadow, var(--anchor-button-shadow, none));
  font: inherit;
  font-weight: var(--anchor-button-weight, 700);
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  appearance: none;
}

.anchor-fixed-page__cta-button .wp-block-button__link{
  min-width: min(320px, 100%);
}

.anchor-fixed-page :where(
  .anchor-fixed-page__cta-button .wp-block-button__link,
  form input[type="submit"],
  form button[type="submit"],
  form .wp-block-button__link
):hover{
  transform: var(--anchor-fixed-button-hover-transform, translateY(-2px));
  filter: brightness(.98);
}

.anchor-fixed-page :where(a,button,input,textarea,select):focus-visible{
  outline: 3px solid var(--anchor-page-primary);
  outline: 3px solid color-mix(in srgb, var(--anchor-page-primary) 36%, transparent);
  outline-offset: 3px;
}

/* ---------- フォームプラグイン共通 ---------- */
.anchor-fixed-page form{
  display: grid;
  gap: max(16px, var(--anchor-grid-gap, 24px));
}

.anchor-fixed-page form :where(p,.smf-item,.mw_wp_form_input,.wpcf7-form-control-wrap){
  margin-top: 0;
}

.anchor-fixed-page form :where(label,.smf-item__label,.form-label){
  display: block;
  margin-bottom: 8px;
  color: var(--anchor-page-heading);
  font-weight: 700;
}

.anchor-fixed-page form :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
  textarea,
  select
){
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--anchor-page-border);
  border-radius: var(--anchor-radius-input, var(--radius-s));
  background: var(--anchor-page-surface);
  color: var(--anchor-page-text);
  box-shadow: none;
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.anchor-fixed-page form textarea{
  min-height: 180px;
  resize: vertical;
}

.anchor-fixed-page form :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
  textarea,
  select
):focus{
  border-color: var(--anchor-page-primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--anchor-page-primary) 16%, transparent);
  outline: 0;
}

.anchor-fixed-page form :where(input[type="checkbox"],input[type="radio"]){
  accent-color: var(--anchor-page-primary);
}

.anchor-fixed-page form :where(.required,.is-required,.smf-item__label__text + span){
  color: var(--anchor-page-primary-dark);
}

.anchor-fixed-page form :where(.wpcf7-not-valid-tip,.smf-error-messages,.error){
  color: #b32d2e;
  font-size: .9em;
}

.anchor-fixed-page form :where(.wpcf7-response-output,.smf-complete-content){
  margin: 0;
  padding: var(--anchor-card-padding, 28px);
  border-color: var(--anchor-page-border);
  border-radius: var(--anchor-radius-card, var(--radius-m));
  background: var(--anchor-page-soft);
}

/* ---------- レスポンシブ ---------- */
@media (min-width: 769px) and (max-width: 1024px){
  .anchor-fixed-page .anchor-fixed-page__card-title{
    font-size: var(--h3-size-tb, var(--h3-size, 20px)) !important;
    line-height: var(--h3-lh-tb, var(--h3-lh, 1.6)) !important;
  }
}

@media (max-width: 900px){
  .anchor-fixed-page .anchor-fixed-page__cards{
    --anchor-service-card-columns: 2;
  }

  .anchor-fixed-page .anchor-fixed-page__cards--count-1{
    --anchor-service-card-columns: 1;
  }
}

@media (max-width: 680px){
  .anchor-fixed-page .anchor-fixed-page__card-title{
    font-size: var(--h3-size-sp, var(--h3-size, 20px)) !important;
    line-height: var(--h3-lh-sp, var(--h3-lh, 1.6)) !important;
  }

  .anchor-fixed-page{
    --anchor-page-section-gap: clamp(32px, calc(var(--anchor-section-spacing, 80px) * .62), 58px);
  }

  .anchor-fixed-page__gallery,
  .anchor-fixed-page__profile-main{
    display: block;
  }

  .anchor-fixed-page__gallery > .wp-block-column + .wp-block-column,
  .anchor-fixed-page__profile-main > .wp-block-column + .wp-block-column{
    margin-top: var(--anchor-grid-gap, 24px);
  }

  .anchor-fixed-page__image img,
  .anchor-fixed-page__profile-image img{
    min-height: 210px;
  }

  /* Preserve portrait aspect ratio on narrow fixed-page profile layouts. */
  .anchor-fixed-page__profile-image{
    height: auto;
  }

  .anchor-fixed-page__profile-image img{
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: initial;
  }

  .anchor-fixed-page .anchor-fixed-page__cards{
    --anchor-service-card-columns: 1;
  }

  .anchor-fixed-page__detail-item{
    padding: var(--anchor-card-padding, 24px);
    padding-top: calc(var(--anchor-card-padding, 24px) + 34px);
  }

  .anchor-fixed-page__detail-number{
    left: var(--anchor-card-padding, 24px);
    top: var(--anchor-card-padding, 24px);
    font-size: .95rem;
  }

  .anchor-fixed-page__flow-item{
    grid-template-rows: 72px minmax(104px, 1fr);
    min-height: 188px;
    padding: 0 max(20px, calc(var(--anchor-card-padding, 28px) * .9));
  }

  .anchor-fixed-page__flow-number{
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .anchor-fixed-page__flow-label{
    font-size: .55rem;
  }

  .anchor-fixed-page__flow-index{
    font-size: 1.02rem;
  }

  .anchor-fixed-page__flow-body{
    min-height: 0;
    margin: 0 !important;
    padding: 14px 18px;
  }

  .anchor-fixed-page__price-table--stacked{
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .anchor-fixed-page__price-table--stacked table,
  .anchor-fixed-page__price-table--stacked tbody,
  .anchor-fixed-page__price-table--stacked tr,
  .anchor-fixed-page__price-table--stacked td{
    display: block;
    width: 100%;
    min-width: 0;
  }

  .anchor-fixed-page__price-table--stacked thead{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .anchor-fixed-page__price-table--stacked tr{
    margin-bottom: var(--anchor-grid-gap, 24px);
    overflow: hidden;
    border: var(--anchor-fixed-card-border-width, var(--anchor-card-border-width, 1px)) solid var(--anchor-page-border);
    border-radius: var(--anchor-radius-card, var(--radius-m));
    background: var(--anchor-page-surface);
    box-shadow: var(--anchor-fixed-card-shadow, var(--anchor-card-shadow, none));
  }

  .anchor-fixed-page__price-table--stacked tr:last-child{
    margin-bottom: 0;
  }

  .anchor-fixed-page__price-table--stacked td{
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 12px;
    border-right: 0;
  }

  /* 各料金カード内の区切り線を維持し、カード末尾だけ二重線を避ける。 */
  .anchor-fixed-page__price-table--stacked tr > td:last-child{
    border-bottom: 0;
  }

  .anchor-fixed-page__price-table--stacked td::before{
    content: attr(data-label);
    color: var(--anchor-page-heading);
    font-weight: 700;
  }

  .anchor-fixed-page--office .anchor-fixed-page__table th,
  .anchor-fixed-page--office .anchor-fixed-page__table td{
    display: block;
    width: 100%;
    padding: 13px 16px;
  }

  .anchor-fixed-page--office .anchor-fixed-page__table th{
    border-right: 0;
    border-bottom: 0;
  }

  .anchor-fixed-page--office .anchor-fixed-page__table td{
    padding-top: 7px;
    border-right: 0;
  }

  .anchor-fixed-page__cta-button .wp-block-button__link,
  .anchor-fixed-page form input[type="submit"],
  .anchor-fixed-page form button[type="submit"]{
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce){
  .anchor-fixed-page *,
  .anchor-fixed-page *::before,
  .anchor-fixed-page *::after{
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   ANCHOR ページパターンビルダー生成セクション
   3.8.0
   ========================================================= */
.anchor-pattern-page{
  width:100%;
}

.anchor-pattern-section{
  position:relative;
  width:100%;
  margin-top:var(--anchor-page-section-gap);
  padding:0;
  box-sizing:border-box;
}

.anchor-pattern-section:first-child{
  margin-top:0;
}

.anchor-pattern-section--bg-soft,
.anchor-pattern-section--bg-emphasis{
  padding:clamp(24px,4vw,46px);
  border-radius:var(--anchor-radius-card,var(--radius-l,24px));
}

.anchor-pattern-section--bg-soft{
  background:var(--anchor-page-soft);
}

.anchor-pattern-section--bg-emphasis{
  background:var(--anchor-page-emphasis);
  border:var(--anchor-card-border-width,1px) solid var(--anchor-page-border);
}

.anchor-pattern-section--lead.anchor-pattern-section--variant-centered{
  text-align:center;
}

.anchor-pattern-section--lead.anchor-pattern-section--variant-centered .anchor-fixed-page__lead{
  margin-inline:auto;
}

.anchor-pattern-section--text.anchor-pattern-section--variant-boxed{
  padding:var(--anchor-card-padding,28px);
  border:var(--anchor-card-border-width,1px) solid var(--anchor-page-border);
  border-radius:var(--anchor-radius-card,var(--radius-m,16px));
  background:var(--anchor-page-surface);
  box-shadow:var(--anchor-card-shadow,none);
}

.anchor-pattern-image-text{
  gap:var(--anchor-page-component-gap);
  align-items:center;
}

.anchor-pattern-image-text--reverse > .wp-block-column:first-child{
  order:2;
}

.anchor-pattern-image-placeholder{
  display:grid;
  place-items:center;
  min-height:280px;
  padding:20px;
  border:2px dashed var(--anchor-page-border);
  border-radius:var(--anchor-radius-image,var(--radius-m,16px));
  background:var(--anchor-page-soft);
  color:var(--anchor-page-primary-dark);
  text-align:center;
  box-sizing:border-box;
}

.anchor-pattern-image-placeholder--portrait{
  min-height:380px;
  aspect-ratio:4/5;
}

.anchor-pattern-image-placeholder p{
  margin:0!important;
  font-weight:700;
}

.anchor-pattern-mini-cards,
.anchor-pattern-reasons,
.anchor-pattern-info-cards,
.anchor-pattern-price-plans{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--anchor-grid-gap,24px);
}

/*
 * 3.21.207: カード系レイアウトの外枠をColumns／旧Groupのどちらで
 * 生成しても、Gutenbergの既定flex幅やconstrained幅へ引っ張られないようにする。
 */
.anchor-pattern-mini-cards,
.anchor-pattern-price-plans{
  width:100%;
  max-width:none!important;
  margin-block:0!important;
  align-items:stretch;
}

.anchor-pattern-mini-cards > .anchor-pattern-mini-card-column,
.anchor-pattern-price-plans > .anchor-pattern-price-plan-column,
.anchor-pattern-mini-cards > .wp-block-group__inner-container > .anchor-pattern-mini-card-column,
.anchor-pattern-price-plans > .wp-block-group__inner-container > .anchor-pattern-price-plan-column{
  align-self:stretch;
  box-sizing:border-box;
  width:100%;
  max-width:none!important;
  min-width:0;
  margin:0!important;
}

.anchor-pattern-mini-card-column > .anchor-pattern-mini-card,
.anchor-pattern-price-plan-column > .anchor-pattern-price-plan{
  box-sizing:border-box;
  width:100%;
  max-width:none!important;
  min-width:0;
  height:100%;
  margin:0!important;
}

.anchor-pattern-mini-card{
  display:flex;
  align-items:center;
  min-height:86px;
  margin:0!important;
  padding:18px 20px 18px 50px;
  border:var(--anchor-card-border-width,1px) solid var(--anchor-page-border);
  border-radius:var(--anchor-radius-card,var(--radius-m,16px));
  background:var(--anchor-page-surface);
  box-shadow:var(--anchor-card-shadow,none);
  font-weight:700;
  position:relative;
}

.anchor-pattern-mini-card::before{
  content:"✓";
  position:absolute;
  left:20px;
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--anchor-page-primary);
  color:var(--anchor-fixed-page-contrast,#fff);
  font-size:.78rem;
}

.anchor-pattern-reason,
.anchor-pattern-info-card,
.anchor-pattern-price-plan{
  padding:var(--anchor-card-padding,28px);
}

.anchor-pattern-reasons--numbered .anchor-pattern-reason{
  border-left:5px solid var(--anchor-page-primary);
}

.anchor-pattern-services--two{
  --anchor-service-card-columns:2!important;
}

.anchor-pattern-profile{
  gap:var(--anchor-page-component-gap);
}

.anchor-pattern-profile--compact{
  max-width:760px;
  margin-inline:auto;
}

.anchor-pattern-profile--compact .anchor-pattern-image-placeholder--portrait{
  min-height:300px;
}

.anchor-pattern-info-cards{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.anchor-pattern-info-card .anchor-fixed-page__eyebrow,
.anchor-pattern-price-plan h3{
  margin-top:0!important;
}

.anchor-pattern-price-plan{
  text-align:center;
}

.anchor-pattern-flow--compact{
  gap:12px;
}

.anchor-pattern-flow--compact .anchor-fixed-page__flow-item{
  grid-template-rows:64px minmax(96px,1fr);
  min-height:176px;
}

.anchor-pattern-flow--compact .anchor-fixed-page__flow-number{
  width:54px;
  height:54px;
  min-width:54px;
  min-height:54px;
}

.anchor-pattern-faq{
  display:grid;
  gap:12px;
}

.anchor-pattern-faq-item{
  margin:0;
  border:var(--anchor-card-border-width,1px) solid var(--anchor-page-border);
  border-radius:var(--anchor-radius-card,var(--radius-m,16px));
  background:var(--anchor-page-surface);
  box-shadow:var(--anchor-card-shadow,none);
  overflow:hidden;
}

.anchor-pattern-faq-item summary{
  position:relative;
  padding:18px 54px 18px 22px;
  color:var(--anchor-page-heading);
  font-weight:700;
  cursor:pointer;
}

.anchor-pattern-faq-item summary::after{
  content:"＋";
  position:absolute;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  color:var(--anchor-page-primary);
  font-size:1.3rem;
}

.anchor-pattern-faq-item[open] summary::after{
  content:"−";
}

.anchor-pattern-faq-item > p{
  margin:0!important;
  padding:0 22px 20px;
}

.anchor-pattern-faq--simple .anchor-pattern-faq-item{
  border-width:0 0 1px;
  border-radius:0;
  box-shadow:none;
}

.anchor-pattern-section--cta{
  margin-top:var(--anchor-page-section-gap);
}

.anchor-pattern-section--cta > .anchor-fixed-page__cta{
  margin-top:0!important;
}

.anchor-pattern-cta--emphasis{
  background:var(--anchor-page-primary-dark)!important;
  color:var(--anchor-fixed-page-contrast,#fff);
}

.anchor-pattern-cta--emphasis :where(h2,p){
  color:inherit!important;
}

@media(max-width:900px){
  .anchor-pattern-mini-cards,
  .anchor-pattern-reasons,
  .anchor-pattern-price-plans{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:680px){
  .anchor-pattern-section--bg-soft,
  .anchor-pattern-section--bg-emphasis{
    padding:max(20px,calc(var(--anchor-card-padding,28px)*.78));
  }

  .anchor-pattern-image-text,
  .anchor-pattern-profile{
    display:block;
  }

  .anchor-pattern-image-text--reverse > .wp-block-column:first-child{
    order:initial;
  }

  .anchor-pattern-image-text > .wp-block-column + .wp-block-column,
  .anchor-pattern-profile > .wp-block-column + .wp-block-column{
    margin-top:var(--anchor-grid-gap,24px);
  }

  .anchor-pattern-mini-cards,
  .anchor-pattern-reasons,
  .anchor-pattern-info-cards,
  .anchor-pattern-price-plans{
    grid-template-columns:1fr;
  }

  .anchor-pattern-image-placeholder{
    min-height:220px;
  }

  .anchor-pattern-image-placeholder--portrait{
    max-width:320px;
    min-height:340px;
    margin-inline:auto;
  }
}

/* Groupブロックの内部ラッパーが存在する環境でもレイアウトを維持する */
.anchor-pattern-mini-cards > .wp-block-group__inner-container,
.anchor-pattern-reasons > .wp-block-group__inner-container,
.anchor-pattern-info-cards > .wp-block-group__inner-container,
.anchor-pattern-price-plans > .wp-block-group__inner-container{
  display:grid;
  grid-column:1 / -1;
  grid-template-columns:inherit;
  gap:inherit;
  width:100%;
  max-width:none!important;
  min-width:0;
  margin:0!important;
}

/*
 * 古いGroupブロック形式とWordPressのconstrainedレイアウトが併存しても、
 * 「お悩み・対象者」のカードを1文字幅まで縮ませない。
 */
.anchor-pattern-mini-cards > .anchor-pattern-mini-card,
.anchor-pattern-mini-cards > .wp-block-group__inner-container > .anchor-pattern-mini-card,
.anchor-pattern-price-plans > .anchor-pattern-price-plan,
.anchor-pattern-price-plans > .wp-block-group__inner-container > .anchor-pattern-price-plan{
  justify-self:stretch;
  box-sizing:border-box;
  width:100%;
  max-width:none!important;
  min-width:0;
  margin-inline:0!important;
  writing-mode:horizontal-tb;
  word-break:normal;
  overflow-wrap:anywhere;
}

.anchor-pattern-faq > .wp-block-group__inner-container{
  display:grid;
  gap:inherit;
}

.anchor-pattern-section--cta .anchor-fixed-page__cta{
  margin-top:0!important;
}

/* 3.8.7: パターン「選ばれる理由」の内部ラッパー幅・日本語改行を補正 */
.anchor-pattern-reasons > .wp-block-group__inner-container{
  grid-column:1 / -1;
  width:100%;
  max-width:none!important;
  min-width:0;
  margin:0!important;
}
.anchor-pattern-reason{
  min-width:0;
}
.anchor-pattern-reason .anchor-fixed-page__card-title{
  max-width:100%;
  word-break:normal;
  overflow-wrap:normal;
  line-break:strict;
  text-wrap:balance;
}
