/* ==========================================================================
   Site header — SP layout (Figma pc_header_menu comp @ 375px)
   All pages — responsive overrides only
   ========================================================================== */

@media (max-width: 767px) {
  /* ----- Breadcrumb — hide on all pages ----- */
  nav[aria-label='パンくずリスト'] {
    display: none !important;
  }

  /* 下層ページ共通 — ヘッダー下〜FV人物中央あたり: 白 → #F5F2ED
     TOP は独自 FV のため除外。z-index:0 で装飾 blob / 写真より背面。 */
  body > div[class*='bg-[#f5f2ed]'][class*='relative']:not(:has(.top-main))::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    /* header(~95px) + FV人物画像のおよそ中央まで */
    height: 420px !important;
    background-image: linear-gradient(
      to bottom,
      #ffffff 0%,
      #ffffff 95px,
      #f5f2ed 100%
    ) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  /* ヘッダーは不透明な白背景にする。TOP ページの FV ブロブ装飾（回転させた
     大きな円形グラデーション）が margin-top:-60px の影響でヘッダーの
     裏側（y:0〜約92px）まで伸びており、透明背景のままだと透けて見えて
     しまっていたため。 */
  body > div[class*='bg-[#f5f2ed]'] > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    /* Figma header 336:43269 — px-[20px] py-[10px] */
    padding: 10px 20px !important;
    align-self: stretch !important;
    overflow: visible !important;
    background-color: #fff !important;
    background-image: none !important;
    z-index: 10 !important;
  }

  /* H1 / FV タイトル — グラデーションより前面
     ※ .top-fv__title は absolute のままにする（relative にすると SP/Tablet の
        ヒーロー上オーバーレイが崩れ、セクション高さも狂う） */
  body > div[class*='bg-[#f5f2ed]'] > section.top-fv .top-fv__title {
    z-index: 6 !important;
  }

  body > div[class*='bg-[#f5f2ed]'] > div[class*='h-[200px]'],
  body > div[class*='bg-[#f5f2ed]'] > main > div[class*='h-[200px]'],
  body > div[class*='bg-[#f5f2ed]'] [class*='-fv-title']:not(.top-fv__title) {
    position: relative !important;
    z-index: 6 !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > * {
    position: relative !important;
    z-index: 1 !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 40.323px !important;
    width: 100% !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] > a[class*='w-[280px]'] {
    width: 191px !important;
    max-width: min(191px, 100%) !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 0 !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] > a[class*='w-[280px]'] [class*='text-[14px]'],
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] > a[class*='w-[280px]'] [class*='text-[14px]'] p {
    color: var(--colore-2, var(--p, #636171)) !important;
    font-family: 'Zen Maru Gothic', sans-serif !important;
    font-size: 9.409px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: normal !important;
    text-align: left !important;
  }

  /* ハンバーガーを So-Ai ロゴ画像と縦位置揃え（タグライン除外） */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] > .site-header-hamburger {
    align-self: flex-end !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] > div[class*='flex-[1_0_0]'][class*='items-end'] {
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    align-self: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    gap: 9.409px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'][class*='w-full'] {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    align-content: center !important;
    gap: 8.065px !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: flex-end !important;
  }

  /* Line break after phone row without expanding container width */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]']::before {
    content: '' !important;
    flex-basis: 100% !important;
    width: 0 !important;
    height: 0 !important;
    order: 2 !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]']::after {
    content: '' !important;
    flex-basis: 100% !important;
    width: 0 !important;
    height: 0 !important;
    order: 4 !important;
  }

  /* Row 1: phone icon + number (side by side) */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[21px]'][class*='w-[20px]'] {
    flex: 0 0 auto !important;
    order: 0 !important;
    width: 13.441px !important;
    height: 14.113px !important;
    position: relative !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[21px]'][class*='w-[20px]'] img {
    position: static !important;
    inset: auto !important;
    width: 13.441px !important;
    height: 14.113px !important;
    object-fit: contain !important;
  }

  /* Row 1: phone number (right of icon) */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > a[href^='tel:'] {
    flex: 0 0 auto !important;
    order: 1 !important;
    text-align: center !important;
    color: var(--corlor-1, #8e5572) !important;
    font-family: 'Zen Maru Gothic', sans-serif !important;
    font-size: 18.817px !important;
    font-style: normal !important;
    font-weight: 900 !important;
    line-height: normal !important;
    letter-spacing: 1.882px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > a[href^='tel:'] p {
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-style: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
  }

  /* Row 2: LINE button */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[26px]'][class*='w-[126'] {
    flex: 0 0 auto !important;
    order: 3 !important;
    width: auto !important;
    height: 17.473px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    overflow: visible !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[26px]'][class*='w-[126'] img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 85.34px !important;
    height: 17.473px !important;
    aspect-ratio: 85.34 / 17.47 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
    content: url('../../assets/images/btn-line-reservation-sp.png') !important;
  }

  /* Row 3: EPARK + SNS icons (grouped, center-aligned) */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[30px]'][class*='w-[87px]'] {
    flex: 0 0 auto !important;
    order: 5 !important;
    width: 58.468px !important;
    height: 20.161px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='size-[26px]']:nth-child(5) {
    flex: 0 0 auto !important;
    order: 6 !important;
    width: 17.473px !important;
    height: 17.473px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='size-[26px]']:nth-child(6) {
    flex: 0 0 auto !important;
    order: 7 !important;
    width: 17.473px !important;
    height: 17.473px !important;
  }

  /* Global nav — centered block, link text right edges aligned */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'][class*='w-full'] {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 6px !important;
    width: fit-content !important;
    max-width: 100% !important;
    align-self: flex-end !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] {
    position: relative !important;
    z-index: 3 !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    text-align: right !important;
    width: 100% !important;
    max-width: 100% !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 3 !important;
    color: var(--colore-2, var(--p, #636171)) !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link:hover,
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link:focus-visible {
    color: var(--corlor-1, #8e5572) !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link span,
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link [class*='text-[18px]'] {
    color: inherit !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  /* Header contact icons — LINE / EPARK / SNS links */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] a.site-header-contact-link {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 3 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* ----- Footer gray sub-links（インビザライン等と統一: 9.409px） ----- */
  .top-footer > [class*='gap-[36px]'] p[class*='text-[#636171]'] span,
  .site-footer > [class*='gap-[36px]'] p[class*='text-[#636171]'] span {
    color: var(--colore-2, var(--p, #636171)) !important;
    font-family: 'Noto Sans JP', 'Noto Sans CJK JP', 'Hiragino Sans', sans-serif !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 17.473px !important;
    letter-spacing: 0.941px !important;
  }

  /* 医院外観写真 — 左右余白（全ページ共通 / マップは全幅のまま） */
  .site-footer > [class*='aspect-[1944'],
  .top-footer > [class*='aspect-[1944'] {
    width: calc(100% - 80px) !important;
    max-width: calc(100% - 80px) !important;
    margin-inline: 40px !important;
    align-self: center !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .site-footer > [class*='aspect-[1944'] img,
  .top-footer > [class*='aspect-[1944'] img {
    border-radius: 10px !important;
  }
}

/* 下層ページ共通 — Tablet 白 → #F5F2ED グラデ（PC 上部の明るさに寄せる） */
@media (min-width: 768px) and (max-width: 1024px) {
  body > div[class*='bg-[#f5f2ed]'][class*='relative']:not(:has(.top-main))::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 520px !important;
    background-image: linear-gradient(
      to bottom,
      #ffffff 0%,
      #ffffff 100px,
      #f5f2ed 100%
    ) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }
}

/* ==========================================================================
   Site header — Hamburger menu (SP + Tablet, ≤1024px)
   Figma: 371:28977 (open panel), 336:43277 (collapsed header)
   Toggle state is read straight from the button's aria-expanded attribute,
   so mobile-nav.js only needs to flip that attribute — no extra JS class.
   ========================================================================== */
@media (max-width: 1024px) {
  /* ヘッダーは常に最前面。TOP ページ FV の写真・装飾ブロブは overflow:visible
     で下のセクションまで滲み出す実装のため（.top-fv__bg など z-index:3、
     .top-main z-index:4）、ヘッダー自身にもそれらより高い z-index を
     明示しておく（SP は上の rule で z-index:10 を別途指定済み、ここは
     タブレット幅も含めた保険）。 */
  body > div[class*='bg-[#f5f2ed]'] > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
  }

  /* Header row — logo left, hamburger right (SP + Tablet).
     Overrides the older "stack logo + nav" rules that also target
     ≤1024px (css/style.css) and ≤767px (this file, below); this
     selector must stay at least as specific as those so the row
     layout wins here regardless of source order. */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] {
    flex-direction: row !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 0 !important;
  }

  .site-header-hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    /* Figma 336:43266 — size-[48px] */
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex: 0 0 auto;
    position: relative;
    z-index: 20;
    -webkit-tap-highlight-color: transparent;
  }

  .site-header-hamburger__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #1f1f1f;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .site-header-hamburger[aria-expanded='true'] .site-header-hamburger__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .site-header-hamburger[aria-expanded='true'] .site-header-hamburger__bar:nth-child(2) {
    opacity: 0;
  }

  .site-header-hamburger[aria-expanded='true'] .site-header-hamburger__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  #site-mobile-nav {
    display: none !important;
  }

  /* position: fixed (not absolute) so left/right: 0 measure from the
     viewport edge rather than the header's own padding box — the header
     has 40–45px of inline padding, which otherwise inset the panel and
     kept it from reaching the true screen edge. mobile-nav.js sets the
     "top" inline style to the header's actual rendered height. */
  .site-header-hamburger[aria-expanded='true'] ~ #site-mobile-nav {
    display: flex !important;
    flex-direction: column-reverse !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 95px) !important;
    overflow-y: auto !important;
    background: #fff !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    padding: 24px 40px 32px !important;
    box-sizing: border-box !important;
    z-index: 15 !important;
  }

  /* Dims the page content only — starts below the header (mobile-nav.js
     sets --mobile-nav-offset to the header's rendered height) so the
     header bar itself, which has a transparent background, never shows
     the dim color through it. */
  body:has(.site-header-hamburger[aria-expanded='true'])::after {
    content: '' !important;
    position: fixed !important;
    top: var(--mobile-nav-offset, 95px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(31, 31, 31, 0.25) !important;
    z-index: 9 !important;
  }
}

/* ==========================================================================
   Site header — Hamburger panel contents at Tablet (768–1024px)
   Same vertical-stack layout as SP: nav links in a column, then phone /
   LINE / SNS icons, each broken onto their own row via the ::before/::after
   flex-basis:100% trick. Duplicated (not range-widened) from the ≤767px
   block above so unrelated ≤767px-only rules (breadcrumb, gradient,
   footer link sizing) stay untouched at tablet width.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] > div[class*='gap-[60px]'] > div[class*='flex-[1_0_0]'][class*='items-end'] {
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    align-self: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    gap: 9.409px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'][class*='w-full'] {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    align-content: center !important;
    gap: 8.065px !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: flex-end !important;
  }

  /* Line break after phone row without expanding container width */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]']::before {
    content: '' !important;
    flex-basis: 100% !important;
    width: 0 !important;
    height: 0 !important;
    order: 2 !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]']::after {
    content: '' !important;
    flex-basis: 100% !important;
    width: 0 !important;
    height: 0 !important;
    order: 4 !important;
  }

  /* Row 1: phone icon + number (side by side) */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[21px]'][class*='w-[20px]'] {
    flex: 0 0 auto !important;
    order: 0 !important;
    width: 13.441px !important;
    height: 14.113px !important;
    position: relative !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[21px]'][class*='w-[20px]'] img {
    position: static !important;
    inset: auto !important;
    width: 13.441px !important;
    height: 14.113px !important;
    object-fit: contain !important;
  }

  /* Row 1: phone number (right of icon) */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > a[href^='tel:'] {
    flex: 0 0 auto !important;
    order: 1 !important;
    text-align: center !important;
    color: var(--corlor-1, #8e5572) !important;
    font-family: 'Zen Maru Gothic', sans-serif !important;
    font-size: 18.817px !important;
    font-style: normal !important;
    font-weight: 900 !important;
    line-height: normal !important;
    letter-spacing: 1.882px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > a[href^='tel:'] p {
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-style: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
  }

  /* Row 2: LINE button */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[26px]'][class*='w-[126'] {
    flex: 0 0 auto !important;
    order: 3 !important;
    width: auto !important;
    height: 17.473px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    overflow: visible !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[26px]'][class*='w-[126'] img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 85.34px !important;
    height: 17.473px !important;
    aspect-ratio: 85.34 / 17.47 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
    content: url('../../assets/images/btn-line-reservation-sp.png') !important;
  }

  /* Row 3: EPARK + SNS icons (grouped, center-aligned) */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='h-[30px]'][class*='w-[87px]'] {
    flex: 0 0 auto !important;
    order: 5 !important;
    width: 58.468px !important;
    height: 20.161px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='size-[26px]']:nth-child(5) {
    flex: 0 0 auto !important;
    order: 6 !important;
    width: 17.473px !important;
    height: 17.473px !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] > [class*='size-[26px]']:nth-child(6) {
    flex: 0 0 auto !important;
    order: 7 !important;
    width: 17.473px !important;
    height: 17.473px !important;
  }

  /* Global nav — centered block, link text right edges aligned */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'][class*='w-full'] {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 6px !important;
    width: fit-content !important;
    max-width: 100% !important;
    align-self: flex-end !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] {
    position: relative !important;
    z-index: 3 !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    text-align: right !important;
    width: 100% !important;
    max-width: 100% !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 3 !important;
    color: var(--colore-2, var(--p, #636171)) !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link:hover,
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link:focus-visible {
    color: var(--corlor-1, #8e5572) !important;
  }

  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link span,
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[23px]'] a.site-header-nav-link [class*='text-[18px]'] {
    color: inherit !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  /* Header contact icons — LINE / EPARK / SNS links */
  body > div > div[class*='bg-white'][class*='px-[190px]'][class*='py-[18px]'][class*='w-[1536px]'] div[class*='gap-[12px]'] a.site-header-contact-link {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 3 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
  }
}

/* ==========================================================================
   Site footer — Tablet layout (768px–1024px, 全ページ共通)
   .site-footer（下層） / .top-footer（TOP）で同一構成
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1024px) {
  /* ----- Section headings（h2） ----- */
  .top-main [class*='text-[46px]'][class*='text-[#8e5572]'],
  .top-main [class*='text-[46px]'][class*='text-[#8e5572]'] p,
  .top-main [class*='text-[46px]'][class*='text-[#8e5572]'] span,
  body [class*='-main'] [class*='text-[46px]'][class*='text-[#8e5572]'],
  body [class*='-main'] [class*='text-[46px]'][class*='text-[#8e5572]'] p,
  body [class*='-main'] [class*='text-[46px]'][class*='text-[#8e5572]'] span {
    font-size: 32px !important;
    line-height: 1.3 !important;
    letter-spacing: 1.6px !important;
  }

  .top-main [class*='leading-[62px]'],
  body [class*='-main'] [class*='leading-[62px]'] {
    line-height: 1.3 !important;
  }

  .top-main [class*='h-[59px]'][class*='w-[120px]'],
  body [class*='-main'] [class*='h-[59px]'][class*='w-[120px]'] {
    height: 44px !important;
    width: 90px !important;
  }

  .site-footer,
  .top-footer {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    padding-top: 120px !important;
    padding-inline: 0 !important;
    padding-bottom: 48px !important;
    gap: 48px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .site-footer > [class*='aspect-[3050'],
  .top-footer > [class*='aspect-[3050'] {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    align-self: stretch !important;
    border-radius: 0 !important;
  }

  /* 医院外観写真 — 左右余白（マップは全幅のまま） */
  .site-footer > [class*='aspect-[1944'],
  .top-footer > [class*='aspect-[1944'] {
    width: calc(100% - 80px) !important;
    max-width: calc(100% - 80px) !important;
    margin-inline: 40px !important;
    align-self: center !important;
    border-radius: 10px !important;
    overflow: hidden !important;
  }

  .site-footer > [class*='aspect-[3050'] img,
  .site-footer > [class*='aspect-[3050'] iframe,
  .top-footer > [class*='aspect-[3050'] img,
  .top-footer > [class*='aspect-[3050'] iframe,
  .site-footer > .site-footer-map iframe,
  .top-footer > .site-footer-map iframe {
    border-radius: 0 !important;
  }

  .site-footer > [class*='aspect-[1944'] img,
  .top-footer > [class*='aspect-[1944'] img {
    border-radius: 10px !important;
  }

  .site-footer > :not([class*='aspect-[3050']):not([class*='aspect-[1944']),
  .top-footer > :not([class*='aspect-[3050']):not([class*='aspect-[1944']) {
    padding-inline: 60px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* サイトマップ — 4列・折り返し可 */
  .site-footer > [class*='gap-[36px]'],
  .top-footer > [class*='gap-[36px]'] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
    align-items: flex-start !important;
    gap: 24px 36px !important;
    white-space: normal !important;
    text-align: left !important;
    letter-spacing: 1.2px !important;
  }

  .site-footer > [class*='gap-[36px]'] > div,
  .top-footer > [class*='gap-[36px]'] > div {
    flex: 0 1 calc((100% - 108px) / 4) !important;
    width: calc((100% - 108px) / 4) !important;
    max-width: calc((100% - 108px) / 4) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }

  .site-footer > [class*='gap-[36px]'] [class*='items-center'],
  .top-footer > [class*='gap-[36px]'] [class*='items-center'] {
    align-items: flex-start !important;
  }

  .site-footer > [class*='gap-[36px]'] [class*='text-center'],
  .top-footer > [class*='gap-[36px]'] [class*='text-center'] {
    text-align: left !important;
  }

  .site-footer > [class*='gap-[36px]'] [class*='gap-[20px]'],
  .top-footer > [class*='gap-[36px]'] [class*='gap-[20px]'] {
    gap: 16px !important;
  }

  .site-footer > [class*='gap-[36px]'] .site-footer-link,
  .site-footer > [class*='gap-[36px]'] .site-footer-link p,
  .top-footer > [class*='gap-[36px]'] .site-footer-link,
  .top-footer > [class*='gap-[36px]'] .site-footer-link p {
    text-align: left !important;
  }

  .site-footer > [class*='gap-[36px]'] > div:first-child,
  .top-footer > [class*='gap-[36px]'] > div:first-child {
    font-family: 'Noto Sans JP', 'Noto Sans CJK JP', 'Hiragino Sans', sans-serif !important;
    font-weight: 700 !important;
    color: var(--color-primary, #8e5572) !important;
  }

  .site-footer > [class*='gap-[36px]'] > div:first-child .site-footer-link p,
  .top-footer > [class*='gap-[36px]'] > div:first-child .site-footer-link p {
    font-size: 13px !important;
    line-height: 24px !important;
    letter-spacing: 1.2px !important;
  }

  .site-footer > [class*='gap-[36px]'] p[class*='text-[#8e5572]'][class*='text-[16px]'],
  .top-footer > [class*='gap-[36px]'] p[class*='text-[#8e5572]'][class*='text-[16px]'] {
    font-size: 13px !important;
    line-height: 22px !important;
    letter-spacing: 1.2px !important;
  }

  .site-footer > [class*='gap-[36px]'] p[class*='text-[#636171]'],
  .site-footer > [class*='gap-[36px]'] p[class*='text-[14px]'][class*='underline'],
  .top-footer > [class*='gap-[36px]'] p[class*='text-[#636171]'],
  .top-footer > [class*='gap-[36px]'] p[class*='text-[14px]'][class*='underline'] {
    font-size: 12px !important;
    line-height: 22px !important;
    letter-spacing: 1.1px !important;
  }

  .site-footer > [class*='gap-[36px]'] p[class*='text-[#636171]'] span,
  .top-footer > [class*='gap-[36px]'] p[class*='text-[#636171]'] span {
    font-size: 12px !important;
    line-height: 22px !important;
    letter-spacing: 1.1px !important;
  }

  /* ロゴ・住所 */
  .site-footer [class*='max-w-[840px]'],
  .top-footer [class*='max-w-[840px]'] {
    max-width: 100% !important;
    gap: 24px !important;
    align-items: center !important;
  }

  .site-footer [class*='gap-[41px_60px]'],
  .top-footer [class*='gap-[41px_60px]'] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 32px 48px !important;
    width: 100% !important;
  }

  .site-footer [class*='gap-[41px_60px]'] [class*='px-[30px]'],
  .top-footer [class*='gap-[41px_60px]'] [class*='px-[30px]'] {
    padding-inline: 0 !important;
    flex: 1 1 240px !important;
    min-width: 0 !important;
    width: auto !important;
    align-items: center !important;
  }

  .site-footer [class*='aspect-[3635'],
  .top-footer [class*='aspect-[3635'] {
    min-height: 0 !important;
    min-width: 0 !important;
    max-width: 280px !important;
    width: 100% !important;
    margin-inline: auto !important;
  }

  .site-footer [class*='gap-[41px_60px]'] [class*='text-[18px]'],
  .top-footer [class*='gap-[41px_60px]'] [class*='text-[18px]'] {
    font-size: 15px !important;
    line-height: 24px !important;
    letter-spacing: 0.75px !important;
    text-align: left !important;
    flex: 1 1 240px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* 予約CTA + 電話 */
  .site-footer [class*='gap-[0px_32px]'],
  .top-footer [class*='gap-[0px_32px]'] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 24px 32px !important;
    width: 100% !important;
  }

  .site-footer [class*='gap-[0px_32px]'] > [class*='flex-col'],
  .top-footer [class*='gap-[0px_32px]'] > [class*='flex-col'] {
    align-items: center !important;
    min-width: 0 !important;
    flex: 1 1 240px !important;
    width: auto !important;
  }

  .site-footer [class*='gap-[0px_32px]'] [class*='text-[23px]'],
  .top-footer [class*='gap-[0px_32px]'] [class*='text-[23px]'] {
    font-size: 18px !important;
    letter-spacing: 0.9px !important;
    text-align: center !important;
  }

  .site-footer [class*='gap-[0px_32px]'] [class*='text-[16px]'][class*='text-[color:var(--p'],
  .top-footer [class*='gap-[0px_32px]'] [class*='text-[16px]'][class*='text-[color:var(--p'] {
    font-size: 14px !important;
    line-height: 22px !important;
  }

  .site-footer [class*='gap-[0px_32px]'] [class*='inline-grid'],
  .top-footer [class*='gap-[0px_32px]'] [class*='inline-grid'] {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
  }

  .site-footer [class*='gap-[0px_32px]'] [class*='inline-grid'] [class*='col-1'],
  .top-footer [class*='gap-[0px_32px]'] [class*='inline-grid'] [class*='col-1'] {
    position: relative !important;
    margin: 0 !important;
    width: auto !important;
  }

  .site-footer [class*='gap-[0px_32px]'] [class*='aspect-[45'],
  .top-footer [class*='gap-[0px_32px]'] [class*='aspect-[45'] {
    width: 32px !important;
    height: 34px !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
  }

  .site-footer [class*='gap-[0px_32px]'] a[href^='tel:'][class*='text-[42px]'],
  .site-footer [class*='gap-[0px_32px]'] [class*='text-[42px]'][class*='text-[#8e5572]'],
  .top-footer [class*='gap-[0px_32px]'] a[href^='tel:'][class*='text-[42px]'],
  .top-footer [class*='gap-[0px_32px]'] [class*='text-[42px]'][class*='text-[#8e5572]'] {
    font-size: 32px !important;
    letter-spacing: 1.6px !important;
    width: auto !important;
    margin-left: 0 !important;
  }

  /* SNS アイコン行 */
  .site-footer [class*='gap-[17px]'],
  .site-footer-sns-row,
  .top-footer [class*='gap-[17px]'],
  .top-footer .site-footer-sns-row {
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .site-footer [class*='gap-[17px]'] > [class*='inline-grid'],
  .top-footer [class*='gap-[17px]'] > [class*='inline-grid'] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .site-footer [class*='gap-[17px]'] [class*='col-1'],
  .top-footer [class*='gap-[17px]'] [class*='col-1'] {
    position: relative !important;
    margin: 0 !important;
    grid-column: unset !important;
    grid-row: unset !important;
    flex-shrink: 0 !important;
  }

  .site-footer [class*='gap-[17px]'] [class*='h-[36px]'][class*='w-[176px]'],
  .site-footer-sns-row [class*='h-[36px]'][class*='w-[176px]'],
  .top-footer [class*='gap-[17px]'] [class*='h-[36px]'][class*='w-[176px]'],
  .top-footer .site-footer-sns-row [class*='h-[36px]'][class*='w-[176px]'] {
    width: 160px !important;
    height: 33px !important;
  }

  .site-footer [class*='gap-[17px]'] [class*='h-[44px]'][class*='w-[127px]'],
  .site-footer-sns-row [class*='h-[44px]'][class*='w-[127px]'],
  .top-footer [class*='gap-[17px]'] [class*='h-[44px]'][class*='w-[127px]'],
  .top-footer .site-footer-sns-row [class*='h-[44px]'][class*='w-[127px]'] {
    width: 115px !important;
    height: 40px !important;
  }

  .site-footer [class*='gap-[17px]'] [class*='h-[36px]'][class*='w-[107px]'],
  .site-footer-sns-row [class*='h-[36px]'][class*='w-[107px]'],
  .top-footer [class*='gap-[17px]'] [class*='h-[36px]'][class*='w-[107px]'],
  .top-footer .site-footer-sns-row [class*='h-[36px]'][class*='w-[107px]'] {
    width: 96px !important;
    height: 33px !important;
  }

  .site-footer [class*='gap-[17px]'] [class*='size-[35px]'],
  .site-footer [class*='gap-[17px]'] [class*='size-[36px]'],
  .site-footer-sns-row [class*='size-[35px]'],
  .site-footer-sns-row [class*='size-[36px]'],
  .top-footer [class*='gap-[17px]'] [class*='size-[35px]'],
  .top-footer [class*='gap-[17px]'] [class*='size-[36px]'],
  .top-footer .site-footer-sns-row [class*='size-[35px]'],
  .top-footer .site-footer-sns-row [class*='size-[36px]'] {
    width: 32px !important;
    height: 32px !important;
  }

  .site-footer [class*='min-w-[300px]'],
  .top-footer [class*='min-w-[300px]'] {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .site-footer [class*='max-w-[390px]'],
  .site-footer [class*='max-w-[404px]'],
  .top-footer [class*='max-w-[390px]'],
  .top-footer [class*='max-w-[404px]'] {
    max-width: 100% !important;
  }

  .site-footer > [class*='max-w-[840px]'] > [class*='text-[14px]'],
  .top-footer > [class*='max-w-[840px]'] > [class*='text-[14px]'] {
    font-size: 13px !important;
    line-height: 22px !important;
    letter-spacing: 1.3px !important;
  }
}

/* ==========================================================================
   ネット予約（追従ボタン）— Tablet のみ表示（SP は非表示）
   ========================================================================== */
@media (max-width: 767px) {
  a:has(> .reservation-btn),
  .reservation-btn,
  .reservation-btn[class*='absolute'][class*='size-[150px]'][class*='top-[153px]'][class*='left-[1336px]'],
  a:has(> .reservation-btn) .reservation-btn {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  /* 親 <a> が PC 用 absolute 座標のまま残るとボタンが画面外になるため解除 */
  a:has(> .reservation-btn) {
    display: contents !important;
  }

  /* style.css の属性セレクタ4つ (0,4,0) より強くする */
  .reservation-btn,
  .reservation-btn[class*='absolute'][class*='size-[150px]'][class*='top-[153px]'][class*='left-[1336px]'],
  a:has(> .reservation-btn) .reservation-btn {
    position: fixed !important;
    width: 120px !important;
    height: 120px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    top: auto !important;
    left: auto !important;
    right: 32px !important;
    bottom: 36px !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 18px 12px 14px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  .reservation-btn > img:first-child,
  .reservation-btn[class*='absolute'] > img:first-child {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    pointer-events: none !important;
  }

  .reservation-btn > div[class*='inset-[18%'],
  .reservation-btn[class*='absolute'] > div[class*='inset-[18%'] {
    position: relative !important;
    inset: auto !important;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
    order: 1 !important;
    margin: 0 !important;
  }

  .reservation-btn > div[class*='inset-[18%'] img,
  .reservation-btn[class*='absolute'] > div[class*='inset-[18%'] img {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
  }

  .reservation-btn > p[class*='text-[18px]'],
  .reservation-btn[class*='absolute'] > p[class*='text-[18px]'] {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    letter-spacing: 0.7px !important;
    z-index: 1 !important;
    order: 2 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    color: #fff !important;
  }

  .reservation-btn > p[class*='text-[18px]'] span,
  .reservation-btn[class*='absolute'] > p[class*='text-[18px]'] span {
    letter-spacing: -0.5px !important;
  }

  .reservation-btn > p[class*='text-[12px]'],
  .reservation-btn[class*='absolute'] > p[class*='text-[12px]'] {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    letter-spacing: 0.45px !important;
    z-index: 1 !important;
    order: 3 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    color: #fff !important;
  }
}

/* ----- ページタイトル text-shadow 無効（全ページ共通） ----- */
.fv-hero > [class*='text-shadow'],
.fv-hero > [class*='text-[60px]'],
.fv-hero > [class*='text-shadow'] p,
.fv-hero > [class*='text-[60px]'] p,
.adult-orthodontics-main > div[class*='h-[200px]'] [class*='text-[60px]'],
.adult-orthodontics-main > div[class*='h-[200px]'] [class*='text-[60px]'] p,
.children-orthodontics-fv-title [class*='text-[60px]'],
.children-orthodontics-fv-title [class*='text-[60px]'] p,
.children-orthodontics-main > div[class*='h-[200px]'] [class*='text-[60px]'],
.children-orthodontics-main > div[class*='h-[200px]'] [class*='text-[60px]'] p {
  /* text-shadow: 0 7.56px 5.04px rgba(142, 85, 114, 0.7) !important; */
  text-shadow: none !important;
}
