/* Common styles shared by all pages.
   Extracted only from rules that were byte-equivalent after whitespace normalization across all 8 HTML files. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

.mobile-nav::-webkit-scrollbar { display: none; }

.mobile-nav.open { display: flex; }

.mnav-block { padding: 0 1.5rem; }

.mnav-ttl {
  padding: 0.7rem 1.5rem 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin: 0 -1.5rem;
  background: var(--white);
  display: flex; justify-content: space-between; align-items: center;
}

.mnav-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--dark); flex: 1; min-width: 0; }

.mnav-logo img { width: 44px; height: 44px; flex-shrink: 0; }

.mnav-logo-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }

.mnav-logo-sub { font-size: 0.62rem; color: var(--gray); letter-spacing: 0.04em; }

.mnav-logo-main { font-family: 'Noto Serif JP', serif; font-size: 1.05rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mnav-back { margin: 0 -1.5rem; padding: 0.55rem 1.5rem; background: var(--white); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

.mnav-line { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.35rem; min-width: 7.2rem; text-decoration: none; color: #06C755; font-family: 'Noto Sans JP', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.05em; white-space: nowrap; }

.mnav-line span { display: none; }

.mnav-line::before { content: "お問い合わせ"; display: inline-block; color: currentColor; }

.mnav-line svg { width: 22px; height: 22px; fill: currentColor; }

.mnav-back .mnav-top { margin: 0; padding: 0; align-self: auto; display: inline-block; }

.mnav-section {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem; color: var(--gray); letter-spacing: 0.08em;
    font-weight: 600;
    padding: 0.9rem 1rem 0.5rem;
    margin: 0 -1.5rem;
    background: #f3f4f6;
    border-bottom: 1px solid var(--border);
  }

.mnav-actions { display: flex; align-items: center; margin-right: -1.5rem; }

.mnav-icon {
    background: none; border: none; cursor: pointer; padding: 0;
    margin: 0; font: inherit; line-height: 1;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 56px; height: 56px;
    position: relative;
  }

.mnav-icon .bar {
    display: block; width: 26px; height: 2px; background: var(--dark);
    transition: transform 0.2s, opacity 0.2s;
    position: relative;
  }

.mnav-icon .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }

.mnav-icon .bar:nth-child(2) { opacity: 0; }

.mnav-icon .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mnav-icon .label {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.65rem; color: var(--gray); letter-spacing: 0.05em;
    margin-top: 4px;
  }

.mnav-top {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.85rem;
    color: var(--c1);
    text-decoration: none;
    letter-spacing: 0.05em;
    font-weight: 700;
    align-self: flex-start;
    margin-top: -0.7rem;
    padding: 0.5rem 0.75rem;
  }

.mnav-top:hover { text-decoration: underline; }

.mnav-section-inline {
    position: absolute;
    left: 1rem;
    bottom: 0.5rem;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--gray);
    font-weight: 600;
  }

.mnav-item {
    border-bottom: 1px solid var(--border);
  }

.mnav-item:nth-child(odd) { border-right: 1px solid var(--border); }

.mnav-item-wide {
    grid-column: 1 / -1;
    border-right: none !important;
  }

.mnav-item.mnav-item-ig a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

.mnav-item.mnav-item-ig svg {
    width: 18px;
    height: 18px;
    flex: none;
  }

.mnav-item a:hover { color: var(--c1); }

.fixed-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    background: white;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    transform: translateY(0);
    transition: transform 0.3s ease;
  }

.fixed-bar.visible { transform: translateY(0); }

.fixed-bar-item,
.fixed-bar-item span,
.fixed-bar-item svg {
    color: #fff;
  }

.fixed-bar-item:last-child { border-right: none; }

.fixed-bar-item svg {
    width: 20px; height: 20px;
    stroke: currentColor;
  }

.fixed-bar-item .fixed-bar-icon {
    width: 20px; height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(0.4);
  }

.fixed-bar-tel .fixed-bar-icon,
  .fixed-bar-reserve .fixed-bar-icon,
  .fixed-bar-monshin .fixed-bar-icon,
  .fixed-bar-consult .fixed-bar-icon {
    filter: brightness(0) invert(1) !important;
  }

.fixed-bar-tel {
    background: #0056a7;
    color: white;
  }

.fixed-bar-tel:hover { background: #004a91; color: white; }

.fixed-bar-reserve {
    background: #45b035;
    color: white;
  }

.fixed-bar-reserve:hover { background: #3a9a2c; color: white; }

.fixed-bar-monshin {
    background: #f39800;
    color: white;
  }

.fixed-bar-monshin:hover { background: #d98600; color: white; }

body { padding-bottom: 64px; }

@media (min-width: 900px) {
    .fixed-bar { display: none; }
    body { padding-bottom: 0; }
  }

/* Shared rules extracted in stage 2. */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 300;
  flex-direction: column;
  overflow-y: auto;
  padding-top: 0;
  scrollbar-width: none;
}

/* Shared rules extracted in stage 3. */
header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

.rainbow-line {
  height: 4px;
  background: linear-gradient(to right,
    var(--c1) 0%, var(--c1) 20%,
    var(--c2) 20%, var(--c2) 40%,
    var(--c3) 40%, var(--c3) 60%,
    var(--c4) 60%, var(--c4) 80%,
    var(--c5) 80%, var(--c5) 100%);
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* Lower-page section color themes: one section, one theme color. */
.theme-c1 { --section-theme: var(--c1); --section-theme-light: var(--c1-light); }
.theme-c2 { --section-theme: var(--c2); --section-theme-light: var(--c2-light); }
.theme-c3 { --section-theme: var(--c3); --section-theme-light: var(--c3-light); }
.theme-c4 { --section-theme: var(--c4); --section-theme-light: var(--c4-light); }
.theme-c5 { --section-theme: var(--c5); --section-theme-light: var(--c5-light); }
.theme-neutral { --section-theme: var(--border); --section-theme-light: var(--light-gray); }

/* Reusable age-group case placeholders. Replace each card with verified case data and consented photos. */
.age-case-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(82vw, 320px);
  gap: 1rem;
  margin: 0;
  padding: 0.1rem 0.1rem 0.8rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.age-case-grid::-webkit-scrollbar { display: none; }

.age-case-grid.is-single {
  grid-auto-flow: row;
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
  overflow: visible;
  padding-bottom: 0;
}

.age-case-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  scroll-snap-align: start;
}

.age-case-card-head {
  min-height: 106px;
  padding: 1rem 1.05rem;
  background: var(--section-theme-light, var(--c1-light));
}

.age-case-number {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--section-theme, var(--c1));
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.age-case-card-head h3 {
  margin: 0;
  color: var(--dark);
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  /* 1行のタイトルでも2行分を確保する。カードごとに見出しの高さが変わると
     写真の開始位置がずれて、横に並んだときに段違いになるため */
  min-height: calc(1.6em * 2);
}

/* 治療期間の文字規格と高さを全症例カードで揃える。
   lh は行の高さそのものなので、テキストが入ったときと同じ高さになる */
.age-case-duration {
  margin-top: 0.5rem;
  color: var(--dark);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  min-height: 1.7em;
  min-height: 1lh;
}

.age-case-photo-slot {
  display: flex;
  aspect-ratio: 16 / 10;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  border-bottom: 1px dashed var(--border);
  background: linear-gradient(135deg, #f5f6f8 0%, #e9edf1 100%);
  color: var(--gray);
  text-align: center;
}

.age-case-photo-slot strong {
  color: var(--section-theme, var(--c1));
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.age-case-photo-slot span { font-size: 0.72rem; }

.age-case-card-body { padding: 1rem 1.05rem 1.1rem; }

.age-case-card-body p {
  margin: 0;
  color: var(--gray);
  font-size: 0.78rem;
  line-height: 1.8;
}

.case-disclaimer {
  margin: 0.9rem 0 0;
  color: var(--gray);
  font-size: 0.72rem;
  line-height: 1.8;
}

@media (min-width: 900px) {
  .age-case-grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .age-case-grid.is-single { grid-template-columns: minmax(0, 520px); }
}

/* ===== 症例スライダーの操作系 =====
   横に症例が続くことを伝えるための矢印とドット。要素は js/case-slider.js が
   差し込むので、各ページのHTMLには手を入れない。
   スクロールできない状態（症例1枚・900px以上のグリッド表示）では is-static が
   付いて操作系ごと隠れる。 */
.case-slider { position: relative; }

.case-slider-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: var(--c1);
  cursor: pointer;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.case-slider-btn svg { width: 15px; height: 15px; display: block; }

.case-slider-prev { left: 6px; }
.case-slider-next { right: 6px; }

.case-slider-btn:disabled { opacity: 0.25; pointer-events: none; }

.case-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.case-slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.case-slider-dot.is-current { background: var(--c1); }

.case-slider.is-static .case-slider-btn,
.case-slider.is-static + .case-slider-dots { display: none; }

/* Standard patient consultation banner, matching index.html. */
.consult-banner { background: var(--light-gray); padding: 2.5rem 1.5rem; }

.banner-card {
  max-width: 540px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

.banner-photo { position: relative; width: 100%; height: 200px; overflow: hidden; }

.banner-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 65% 20%;
  display: block;
}

.banner-text {
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--white);
  border-top: 3px solid var(--c1);
}

.banner-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--c1);
  background: var(--c1-light);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  width: fit-content;
}

.banner-catch {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--dark);
  letter-spacing: 0.02em;
}

.banner-catch .accent { color: var(--c1); }

.banner-sub { font-size: 0.82rem; color: var(--gray); line-height: 1.9; }

.banner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--c1);
  color: var(--white);
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  width: fit-content;
  transition: background 0.2s, transform 0.15s;
}

.banner-btn:hover { background: #004a91; transform: translateY(-1px); }

.banner-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* Light-weight CTA band placed after content sections. */
.light-cta {
  width: 100%;
  padding: 0.5rem 0;
  background: var(--white);
}

/* Full-width consultation prompt placed directly after case sections. */
.light-cta--case {
  width: 100vw;
  margin: 1rem 0 1rem calc(50% - 50vw);
}

.light-cta a {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid #d7e5f2;
  border-bottom: 1px solid #d7e5f2;
  background: linear-gradient(100deg, #edf6ff 0%, #f8fbff 58%, #eef7f0 100%);
  color: var(--c1);
  text-decoration: none;
  transition: background 0.2s ease;
}

.light-cta a::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5));
}

.light-cta-inner {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: min(100%, 980px);
  min-height: 92px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  text-align: left;
}

.light-cta-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(0, 86, 167, 0.24);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0, 86, 167, 0.08);
}

.light-cta-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
}

.light-cta-copy {
  display: grid;
  gap: 0.15rem;
}

.light-cta-kicker {
  color: var(--gray);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.light-cta-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.light-cta-mobile-break { display: none; }

.light-cta-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
}

.light-cta-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c1);
  color: var(--white);
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.light-cta a:hover {
  background: linear-gradient(100deg, #e6f2fd 0%, #f4f9fe 58%, #e8f4eb 100%);
}

.light-cta a:hover .light-cta-arrow { transform: translateX(3px); }

.light-cta a:focus-visible {
  outline: 3px solid var(--c3);
  outline-offset: -3px;
}

/* Instagram link placed directly after the patient consultation CTA. */
.consult-instagram-banner {
  background: var(--white);
  padding: 0.4rem 0;
}

.consult-instagram-banner-inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.consult-instagram-banner a {
  display: block;
  width: 100%;
}

.consult-instagram-banner img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .banner-photo { height: 150px; }
  .banner-photo img { transform: scale(1.15); transform-origin: 65% 20%; }
  .banner-btn { margin: 0 auto; }
  .light-cta { padding: 0.4rem 0; }
  .light-cta-inner {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 0.45rem;
    min-height: 84px;
    padding: 0.9rem 0.75rem;
  }
  .light-cta-icon { width: 38px; height: 38px; }
  .light-cta-icon svg { width: 19px; height: 19px; }
  .light-cta-kicker { font-size: 0.6rem; }
  .light-cta-text { font-size: 0.85rem; line-height: 1.55; }
  .light-cta-mobile-break { display: block; }
  .light-cta-action { gap: 0.35rem; }
  .light-cta-action-text { font-size: 0.9rem; font-weight: 600; }
  .light-cta-arrow { width: 30px; height: 30px; }
}

.section-title.c2 { border-color: var(--c2); }
.section-title.c3 { border-color: var(--c3); }
.section-title.c4 { border-color: var(--c4); }
.section-title.c5 { border-color: var(--c5); }

.cta-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons a {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.cta-buttons .primary {
  background: var(--c1);
  color: var(--white);
}

.cta-buttons .secondary {
  background: var(--white);
  color: var(--c1);
  border: 2px solid var(--c1);
}

.hours-table td.x { color: var(--gray); }

[hidden] { display: none !important; }

.case-cards--single {
  justify-content: center;
  overflow: visible;
}

.case-cards--single .case-card {
  flex: 0 1 460px !important;
  width: 100%;
}

/* Visible author/reviewer information for medical explanation pages. */
.medical-review {
  --medical-review-accent: var(--c1);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem 1rem;
  width: calc(100% - 2rem);
  max-width: 860px;
  margin: 1.25rem auto 2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--medical-review-accent);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--dark);
}

.medical-review--c2 { --medical-review-accent: var(--c2); }
.medical-review--c4 { --medical-review-accent: var(--c4); }

.medical-review-label {
  color: var(--medical-review-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.medical-review-body {
  display: flex;
  align-items: baseline;
  gap: 0.4rem 0.7rem;
  min-width: 0;
  flex-wrap: wrap;
}

.medical-review-name {
  color: var(--dark);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.medical-review-name:hover { color: var(--medical-review-accent); }

.medical-review-credential,
.medical-review time {
  color: var(--gray);
  font-size: 0.74rem;
  line-height: 1.6;
}

.medical-review time { white-space: nowrap; }

@media (max-width: 700px) {
  .medical-review {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin: 1rem auto 1.5rem;
    padding: 0.8rem 0.9rem;
  }

  .medical-review-body {
    display: grid;
    gap: 0.1rem;
  }

  .medical-review time { white-space: normal; }
}

.footer-info p {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.9;
}
