/* iOS Safari: アドレスバー伸縮時もビューポート高を確保 */
@supports (-webkit-touch-callout: none) {
  html {
    height: -webkit-fill-available;
  }

  body {
    min-height: -webkit-fill-available;
  }
}

/* ヒーローを画面上端から開始 */
.hero-section {
  margin-top: 0;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

@supports (-webkit-touch-callout: none) {
  .hero-section {
    min-height: -webkit-fill-available;
  }
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 819px;
  }
}

/* 背景画像（HTML img + ルート絶対パス：本番デプロイ・iOS Safari で安定） */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #fcf9f8;
}

.hero-bg__media {
  position: absolute;
  inset: 0;
}

.hero-bg__image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* 白系トーンで明るく（スマホ・PC共通で控えめ、背景写真を残す） */
.hero-bg__tone {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.36);
  pointer-events: none;
}

@supports ((backdrop-filter: brightness(1)) or (-webkit-backdrop-filter: brightness(1))) {
  .hero-bg__tone {
    background-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: brightness(1.1) saturate(0.96);
    -webkit-backdrop-filter: brightness(1.1) saturate(0.96);
  }
}

.hero-bg__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.32) 0%,
      rgba(255, 255, 255, 0.42) 55%,
      rgba(255, 255, 255, 0.48) 100%);
  pointer-events: none;
}

/* テキスト背面の読みやすさ用スクリーン */
.hero-bg__scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse 100% 80% at 50% 48%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.1) 48%,
      transparent 75%);
  pointer-events: none;
}

/* 見出しを画面中央に：上下を 1:1 で分割し h1 を境目に配置 */
.hero-section__layout {
  position: relative;
  z-index: 10;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding-bottom: 4.5rem;
}

.hero-section__upper,
.hero-section__lower {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
}

.hero-section__upper {
  justify-content: flex-end;
  padding-bottom: 2.5rem;
}

.hero-section__lower {
  justify-content: flex-start;
  padding-top: 2.5rem;
}

.hero-section__headline,
.hero-section__content {
  width: 100%;
}

.hero-section__headline h1 {
  color: #111111;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.96),
    0 0 14px rgba(255, 255, 255, 0.72),
    0 1px 3px rgba(0, 0, 0, 0.16);
}

.hero-section .hero-highlight {
  color: #af101a;
  text-decoration-color: #af101a;
}

.hero-section__lead {
  color: #111111;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.72;
  letter-spacing: 0.015em;
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.98),
    0 0 12px rgba(255, 255, 255, 0.78),
    0 1px 4px rgba(0, 0, 0, 0.18);
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 767px) {
  .hero-section__lead {
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-shadow:
      0 1px 2px rgba(255, 255, 255, 1),
      0 2px 16px rgba(255, 255, 255, 0.9),
      0 3px 10px rgba(255, 255, 255, 0.65),
      0 1px 4px rgba(0, 0, 0, 0.14);
  }
}

.hero-section__note {
  color: #3e2e2b;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.72);
}

.hero-section__tags {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .hero-section__upper {
    padding-bottom: 3rem;
  }

  .hero-section__lower {
    padding-top: 3rem;
  }

  .hero-section__layout {
    padding-bottom: 5.5rem;
  }

  .hero-section__tags {
    bottom: 2rem;
    padding: 0 4rem;
  }
}

/* スマホ：レイアウト・文字影の調整 */
@media (max-width: 767px) {
  .hero-bg__image {
    object-position: center 38%;
  }

  .hero-section__headline h1 {
    text-shadow:
      0 1px 2px rgba(255, 255, 255, 1),
      0 0 18px rgba(255, 255, 255, 0.85),
      0 1px 4px rgba(0, 0, 0, 0.2);
  }

  .hero-section__lead {
    text-shadow:
      0 1px 2px rgba(255, 255, 255, 1),
      0 0 16px rgba(255, 255, 255, 0.85),
      0 1px 4px rgba(0, 0, 0, 0.2);
  }

  .hero-section__note {
    text-shadow:
      0 1px 2px rgba(255, 255, 255, 0.95),
      0 0 10px rgba(255, 255, 255, 0.7);
  }
}

/* 画像枠を余白なく埋める */
.img-fill {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

/* 全身評価図の接続線 */
.diagram-connectors {
  z-index: -1;
}

.hero-highlight {
  display: inline;
  line-height: 1;
  text-decoration-line: underline;
  text-decoration-color: #af101a;
  text-decoration-thickness: 4px;
  text-underline-offset: 0.1em;
  text-decoration-skip-ink: none;
}

/* 症状カードアイコン */
.condition-card__icon {
  font-size: 28px;
  color: #af101a;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.group:hover .condition-card__icon {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

/* お客様の声 */
.voices-section {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.voices-section__underline {
  width: 4rem;
  height: 2px;
  margin: 1.5rem auto 0;
  background-color: #af101a;
}

.voices-section__lead {
  margin: 0;
  max-width: 36rem;
}

.voices-section__header .voices-section__lead {
  margin-left: auto;
  margin-right: auto;
}

.voices-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
  align-items: start;
}

/* block レイアウト：iOS Safari の flex 内画像つぶれを回避 */
.voice-item {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.5rem;
  background-color: #fcf9f8;
  border: 1px solid #c6c6c7;
  border-radius: 0.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.voice-item>*+* {
  margin-top: 1.25rem;
}

.voice-item__profile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 9rem;
}

.voice-item__profile-image {
  display: block;
  width: 100%;
  max-width: 16rem;
  height: auto;
  border-radius: 0.125rem;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(27, 28, 28, 0.06);
}

.voice-item__profile--icon {
  padding: 0.25rem 0;
}

.voice-item__avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  background: linear-gradient(145deg, #af101a 0%, #8c0d15 100%);
  box-shadow:
    0 2px 8px rgba(175, 16, 26, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.voice-item__avatar--tone-b {
  background: linear-gradient(145deg, #b85c14 0%, #8f4510 100%);
  box-shadow:
    0 2px 8px rgba(143, 69, 16, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.voice-item__avatar--tone-c {
  background: linear-gradient(145deg, #5c6b7a 0%, #3d4a56 100%);
  box-shadow:
    0 2px 8px rgba(61, 74, 86, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.voice-item__initials {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.voice-item__form {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid #c6c6c7;
  border-radius: 0.125rem;
  overflow: hidden;
  background-color: #f4f4f4;
  line-height: 0;
}

.voice-item__form-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: top;
}

.voice-item__comment {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  padding: 0 0.25rem;
}

.voice-item__tag {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  font-weight: 700;
  color: #af101a;
  background-color: #fff5f3;
  border-radius: 9999px;
}

.voice-item__summary {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #444748;
  overflow-wrap: anywhere;
  word-break: normal;
}

@supports (text-wrap: pretty) {
  .voice-item__summary {
    text-wrap: pretty;
  }
}

@media (max-width: 767px) {
  .voices-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .voice-item {
    position: relative;
    padding-top: 1.75rem;
    overflow: hidden;
  }

  .voice-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #af101a 0%, #d4a574 100%);
  }
}

@media (min-width: 1024px) {
  .voices-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .voice-item {
    padding: 1.25rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  }

  .voice-item>*+* {
    margin-top: 1rem;
  }

  .voice-item__profile {
    min-height: 11rem;
  }

  .voice-item__profile-image {
    max-width: 100%;
  }

  .voice-item__avatar {
    width: 4rem;
    height: 4rem;
  }

  .voice-item__initials {
    font-size: 0.875rem;
  }
}

/* 院長紹介 */
.director-section__underline {
  width: 4rem;
  height: 3px;
  margin: 1rem auto 0;
  background-color: #af101a;
  border-radius: 2px;
}

/* block レイアウト：iOS Safari の flex 子要素の幅つぶれを回避 */
.director-section__layout {
  display: block;
  width: 100%;
}

.director-profile {
  width: 100%;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.director-profile__figure {
  margin: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 0.125rem;
  overflow: hidden;
}

.director-profile__image {
  display: block;
  width: 100%;
  min-height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.director-content {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.director-story__lead {
  margin: 0 0 1.5rem;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.director-story__body {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 2rem;
}

.director-story__body>p,
.director-story__body>.director-quote,
.director-story__body>.director-story__checklist {
  margin: 0 0 1.25rem;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.director-story__body>p:last-child,
.director-story__body>.director-quote:last-child,
.director-story__body>.director-story__checklist:last-child {
  margin-bottom: 0;
}

.director-story__highlight {
  font-weight: 700;
  color: #af101a;
}

.director-story__rhythm {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.director-story__checklist>p {
  margin: 0 0 0.75rem;
}

.director-story__checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.director-story__checklist-list li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.director-story__checklist-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: #af101a;
  font-weight: 700;
}

.director-quote {
  margin: 0;
  width: 100%;
  max-width: 100%;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  background-color: #fff5f3;
  border-left: 4px solid #af101a;
  border-radius: 0 0.125rem 0.125rem 0;
}

.director-quote__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 700;
  color: #af101a;
  overflow-wrap: break-word;
  word-break: normal;
}

.director-quote__text--stack {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

@media (min-width: 1024px) {
  .director-section__layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4rem;
  }

  .director-profile {
    flex: 0 0 18rem;
    width: 18rem;
    margin: 0;
    text-align: center;
  }

  .director-content {
    flex: 1 1 auto;
    min-width: 0;
  }

  .director-story__body>p,
  .director-story__body>.director-quote,
  .director-story__body>.director-story__checklist {
    margin-bottom: 1.5rem;
  }
}

.director-achievements {
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
  padding: 1.5rem;
  background-color: #f4f4f4;
  border-radius: 0.5rem;
}

.director-achievements__item--label {
  margin-top: 0.25rem;
  font-weight: 700;
  color: #1b1c1c;
}

.director-achievements__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.director-achievements__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1b1c1c;
}

.director-achievements__icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: #af101a;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}

@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }

  .diagram-label {
    position: static;
    display: inline-block;
    margin-top: 0.25rem;
    margin-left: 0.25rem;
  }

  .diagram-symptom-label {
    left: -0.5rem;
    font-size: 11px;
    line-height: 1.3;
  }
}

/* iPhone標準幅（375px）: タイポグラフィを1段階縮小 */
@media (max-width: 375px) {
  body .text-headline-lg-mobile {
    font-size: 24px;
    line-height: 32px;
  }

  body .text-headline-md {
    font-size: 20px;
    line-height: 28px;
  }

  body .text-body-lg {
    font-size: 16px;
    line-height: 24px;
  }

  body .text-body-md {
    font-size: 15px;
    line-height: 22px;
  }

  body .text-label-bold {
    font-size: 13px;
    line-height: 18px;
  }

  body .text-label-sm {
    font-size: 11px;
    line-height: 15px;
  }

  body .text-\[40px\] {
    font-size: 32px;
    line-height: 1;
  }

  body .text-\[22px\] {
    font-size: 20px;
    line-height: 28px;
  }

  body .text-\[20px\] {
    font-size: 18px;
    line-height: 26px;
  }

  body .text-lg {
    font-size: 16px;
    line-height: 24px;
  }

  body .text-sm {
    font-size: 13px;
    line-height: 18px;
  }

  body .text-\[20px\].material-symbols-outlined {
    font-size: 18px;
  }

  /* ヒーロー見出しの下線付き強調 */
  body h1 .hero-highlight {
    padding-bottom: 0;
  }

  /* カード・原因ブロックの余白を少し詰める */
  body .bg-surface.border.border-outline-variant.p-8 {
    padding: 1.5rem;
  }

  body .bg-surface-container-lowest.p-6 {
    padding: 1.25rem;
  }

  .director-story__lead {
    font-size: 18px;
    line-height: 1.5;
  }

  .director-story__body>p,
  .director-story__body>.director-quote,
  .director-story__body>.director-story__checklist {
    margin-bottom: 1rem;
  }

  .director-quote__text {
    font-size: 15px;
    line-height: 1.65;
  }

  .director-achievements {
    padding: 1.25rem;
  }

  .director-achievements__item {
    font-size: 15px;
  }

  .director-profile__name {
    font-size: 24px;
  }
}