:root {
  --bg: #f8fafb;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;

  --accent: #dd6a24;
  --accent-light: #f5d6c5;
  --accent-dark: #b8551a;

  --sub: #fff5ef;

  --shadow: 0 10px 30px rgba(0,0,0,0.06);
  --radius: 18px;
  --max: 1280px;
}

/* ======================
   基本
====================== */

html,
body {
  overflow-x: hidden; /* はみ出しによる横スクロール・画面ズレを防止 */
}

body {
  margin: 0;
  font-family:
    "Hiragino Sans",
    "Noto Sans JP",
    "Yu Gothic",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: auto;
}

.section {
  padding: 90px 0;
}

.section-title {
  font-size: 38px;
  margin-bottom: 10px;
}

.section-lead {
  color: var(--muted);
  margin-bottom: 40px;
}

/* ======================
   Header
====================== */

.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(221, 106, 36, 0.08);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    min-height 0.3s ease;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
  border-bottom-color: rgba(221, 106, 36, 0.14);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 88px;
  transition: min-height 0.3s ease;
}

.header.is-scrolled .header-inner {
  min-height: 76px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  line-height: 1;
}

.brand-main {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.nav a {
  white-space: nowrap;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(221, 106, 36, 0.06);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(221, 106, 36, 0.16);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.header-phone:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  border-color: rgba(221, 106, 36, 0.3);
}

.header-phone-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(221, 106, 36, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.header-phone-number {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 24px rgba(221, 106, 36, 0.22);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.header-cta:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
  box-shadow: 0 14px 28px rgba(221, 106, 36, 0.28);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(221, 106, 36, 0.16);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.04);
}

.menu-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 23px; }
.menu-toggle span:nth-child(3) { top: 29px; }

.menu-toggle.is-open span:nth-child(1) {
  top: 23px;
  transform: translateX(-50%) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  top: 23px;
  transform: translateX(-50%) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(221, 106, 36, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-nav {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 18px 0 22px;
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav a:hover {
  background: rgba(221, 106, 36, 0.06);
}

.mobile-nav-phone {
  margin-top: 6px;
  justify-content: center;
  background: var(--accent);
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(221, 106, 36, 0.2);
}

.mobile-nav-phone:hover {
  background: var(--accent-dark) !important;
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 18px;
  }

  .nav a {
    padding: 0 12px;
    font-size: 13px;
  }

  .header-phone {
    padding: 0 14px;
  }

  .header-phone-number {
    font-size: 13px;
  }
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 78px;
  }

  .header.is-scrolled .header-inner {
    min-height: 70px;
  }

  .nav,
  .header-phone,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .brand-main {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 72px;
  }

  .header.is-scrolled .header-inner {
    min-height: 66px;
  }

  .brand-sub {
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  .brand-main {
    font-size: 18px;
  }
}

/* ======================
   Hero
====================== */

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .8s;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  color: white;
  width: min(calc(100% - 32px), var(--max));
  margin: auto;
}

.hero-overlay h1 {
  font-size: 64px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-overlay p {
  font-size: 18px;
  max-width: 600px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
}

.btn-primary {
  background: white;
  color: var(--accent);
}

.btn-secondary {
  border: 1px solid white;
  color: white;
}

/* ======================
   Cards
====================== */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: white;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-number {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: bold;
  margin-bottom: 16px;
}

/* ======================
   Panel
====================== */

.panel {
  background: white;
  padding: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .1em;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 14px;
}

/* ======================
   Info table
====================== */

.info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-row dt {
  color: var(--muted);
  font-weight: bold;
}

/* ======================
   Schedule
====================== */

.schedule {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.schedule table {
  width: 100%;
  border-collapse: collapse;
}

.schedule th {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.schedule th,
.schedule td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.closed {
  color: #bbb;
}

/* ======================
   Map
====================== */

.map-box iframe {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: var(--radius);
}

/* ======================
   Footer
====================== */

.footer {
  padding: 50px 0 120px;
  background: white;
  border-top: 1px solid var(--line);
}

.footer-phone {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent);
}

/* ======================
   Floating CTA
====================== */

.floating-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);

  /* 初期：非表示（下にずらして隠す） */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, bottom 0.35s ease;
}

/* JS が .is-visible を付けたら出現 */
.floating-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.floating-bar a {
  padding: 14px 24px;
  font-weight: bold;
}

.floating-bar .primary {
  background: var(--accent);
  color: white;
}

/* ======================
   スマホ最適化
====================== */

@media (max-width: 767px) {

  /* ヒーローコピーの左右マージン */
  .hero-copy {
    padding: 0 8px;
  }

  /* メールアドレスなど長いテキストの折り返し */
  .info-row dd {
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  /* 「選ばれる3つの理由」「診療内容」→ 縦並び */
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* floating-bar → 縦並びカード型
     left + right で幅を決め、transform をリセット      */
  .floating-bar {
    flex-direction: column;
    border-radius: 20px;
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
  }

  .floating-bar a {
    width: 100%;
    text-align: center;
    white-space: nowrap;
    padding: 15px 16px;
    box-sizing: border-box;
  }

  /* 2つ目のボタン上に区切り線 */
  .floating-bar a + a {
    border-top: 1px solid var(--line);
  }
}

/* ======================
   NEWS セクション
====================== */

.news-section {
  background: var(--sub);
  padding: 48px 0;
  border-bottom: 1px solid rgba(221, 106, 36, 0.1);
}

.news-inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  align-items: start;
}

.news-heading {
  padding-top: 4px;
}

.news-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 6px;
}

.news-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(221, 106, 36, 0.12);
  animation: newsIn 0.4s ease both;
}

.news-item:first-child {
  border-top: 1px solid rgba(221, 106, 36, 0.12);
}

@keyframes newsIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.news-date {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.news-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.news-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 16px 0;
}

@media (max-width: 640px) {
  .news-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .news-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 0;
  }

  .news-title {
    font-size: 18px;
  }

  .news-item {
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
  }
}

/* ======================
   院長メッセージ
====================== */

.doctor-message {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.message-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.message-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.message-block {
  background: var(--bg);
  border-radius: 14px;
  padding: 22px 24px;
  border: 1px solid var(--line);
}

.message-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px !important;
}

.message-block p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 10px;
}

.message-block p:last-child {
  margin-bottom: 0;
}

.message-note {
  font-size: 13px !important;
  color: var(--muted) !important;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .message-grid {
    grid-template-columns: 1fr;
  }
}

/* ======================
   診療内容：特徴・施設・流れ
====================== */

.content-block {
  margin-bottom: 52px;
}

.content-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-light);
  color: var(--text);
}

.content-lead {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.content-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}

.content-note a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.7;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--line);
}

.feature-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.risk-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-list li {
  font-size: 14px;
  line-height: 1.75;
  padding: 10px 14px 10px 36px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--line);
  position: relative;
}

.risk-list li::before {
  content: "・";
  position: absolute;
  left: 14px;
  color: var(--muted);
}

/* 診察フロー */

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.flow-step:first-child {
  border-top: 1px solid var(--line);
}

.flow-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.flow-step div strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.flow-step div p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* ======================
   費用セクション
====================== */

.fee-table-wrap {
  overflow-x: auto;
  margin-bottom: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 15px;
}

.fee-table thead th {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.fee-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  line-height: 1.6;
}

.fee-table tbody tr:last-child td {
  border-bottom: none;
}

.fee-price {
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
}

.fee-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.fee-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.fee-card-head {
  background: var(--sub);
  padding: 14px 20px;
  border-bottom: 1px solid rgba(221,106,36,0.12);
}

.fee-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.fee-detail {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fee-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fee-row dt {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.fee-row dd {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.fee-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  display: block;
}

.fee-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  padding: 0 20px 16px;
  margin: 0;
}

.fee-payment {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.fee-payment-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.fee-payment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fee-payment-list li {
  font-size: 14px;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
}

.fee-payment-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.fee-payment-cards {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 767px) {
  .fee-grid {
    grid-template-columns: 1fr;
  }

  .fee-payment {
    padding: 22px 18px;
  }
}

/* ======================
   SNS セクション
====================== */

.section-sns {
  background: var(--sub);
}

.sns-inner {
  max-width: 600px;
}

.btn-instagram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: white;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 24px rgba(220, 39, 67, 0.25);
}

.btn-instagram:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.insta-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}