/* ==========================================================================
   Subpage H1 — SP offset below header (all pages, loaded after page CSS)
   ========================================================================== */

@media (max-width: 767px) {
  body > div[class*='bg-[#f5f2ed]']:not(:has(.top-main)) [class*='-main'] > div[class*='h-[200px]'],
  body > div[class*='bg-[#f5f2ed]']:not(:has(.top-main)) [class*='-fv-title'] {
    margin-top: 32px !important;
    position: relative !important;
    z-index: 6 !important;
    isolation: isolate !important;
  }

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

  /* 子どもの矯正歯科 — タイトルを1行に（Figma 36px） */
  body:has(.children-orthodontics-page) .children-orthodontics-fv-title [class*='text-[60px]'],
  body:has(.children-orthodontics-page) .children-orthodontics-fv-title [class*='text-[60px]'] p {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    flex: none !important;
    width: auto !important;
    max-width: 100% !important;
    font-size: 36px !important;
    letter-spacing: 1.8px !important;
  }

  /* セクション見出し h2 — TOP .top-main 準拠（22px）
     大人の矯正・子どもの矯正は Figma SP 26px、FAQ / アクティビティルーム / ブログ / 症例 / 料金表 / 初めての方へ / 矯正担当医紹介 / 設備紹介 / ワイヤー矯正も Figma SP 26px のため除外 */
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'],
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'] p,
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'] span,
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[40px]'][class*='text-[#8e5572]'],
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[40px]'][class*='text-[#8e5572]'] p,
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[40px]'][class*='text-[#8e5572]'] span,
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-section'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'],
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-section'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'] p,
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-section'] [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'] span,
  body:has(.medical-info-page) .medical-info-access-section [class*='text-[46px]'][class*='text-[#8e5572]'],
  body:has(.medical-info-page) .medical-info-access-section [class*='text-[46px]'][class*='text-[#8e5572]'] p,
  body:has(.medical-info-page) .medical-info-access-section [class*='text-[46px]'][class*='text-[#8e5572]'] span {
    font-size: 22px !important;
    line-height: 32.258px !important;
    letter-spacing: 1.2095px !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
  }

  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'] [class*='leading-[62px]'],
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-main'] [class*='flex-col'][class*='gap-px'] [class*='leading-[52px]'],
  body:not(:has(.adult-orthodontics-page)):not(:has(.children-orthodontics-page)):not(:has(.faq-page)):not(:has(.activity-room-page)):not(:has(.blog-page)):not(:has(.cases-page)):not(:has(.price-page)):not(:has(.first-visit-page)):not(:has(.orthodontist-page)):not(:has(.equipment-page)):not(:has(.wire-orthodontics-page)) [class*='-section'] [class*='flex-col'][class*='gap-px'] [class*='leading-[62px]'],
  body:has(.medical-info-page) .medical-info-access-section [class*='leading-[62px]'] {
    line-height: 32.258px !important;
  }

  /* FAQ — セクション見出し（Figma SP 26px / 33px / 2.6px） */
  body:has(.faq-page) .faq-main [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'],
  body:has(.faq-page) .faq-main [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'] p,
  body:has(.faq-page) .faq-main [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[46px]'][class*='text-[#8e5572]'] span,
  body:has(.faq-page) .faq-main [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[40px]'][class*='text-[#8e5572]'],
  body:has(.faq-page) .faq-main [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[40px]'][class*='text-[#8e5572]'] p,
  body:has(.faq-page) .faq-main [class*='flex-col'][class*='gap-px'][class*='items-center'] [class*='text-[40px]'][class*='text-[#8e5572]'] span {
    color: var(--corlor-1, #8e5572) !important;
    text-align: center !important;
    font-family: 'Zen Maru Gothic', sans-serif !important;
    font-size: 26px !important;
    font-style: normal !important;
    font-weight: 500 !important;
    line-height: 33px !important;
    letter-spacing: 2.6px !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
  }

  body:has(.faq-page) .faq-main [class*='flex-col'][class*='gap-px'] [class*='leading-[62px]'] {
    line-height: 33px !important;
  }

  /* アクティビティルーム — Figma SP は2行（activity-room.css 側で制御） */)
}
