@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ═══════════════════════════════
   CSS変数
═══════════════════════════════ */
:root {
  --primary:       #1a3a93;
  --primary-light: #4f76fd;
  --secondary:     #456ffc;
  --accent:        #fe81ac;
  --danger:        #cc0000;
  --white:         #ffffff;
  --text:          #1a1a2e;
  --radius:        8px;
  --shadow:        0 2px 12px rgba(26,58,147,0.13);
  --max-w:         680px;
}

/* ═══════════════════════════════
   共通リセット
═══════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { margin: 0; padding: 0; }


/* ═══════════════════════════════════════════════════════════
   トップページ（body.page-index）
═══════════════════════════════════════════════════════════ */
body.page-index {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.85;
}
body.page-index a { color: #fff; text-decoration: none; transition: color .2s; }
body.page-index a:hover { text-decoration: none; color: #fff; }
body.page-index a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.nav-btn { border-radius: 0 !important; }
.block.nav-grid-3 { border-radius: 0 !important; }

.site-wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2px 4px 32px;
}

/* バッジ */
.badge-new {
  display: inline-block; background: #e53e3e; color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 1px 5px;
  border-radius: 3px; margin-right: 4px; vertical-align: middle;
}
.badge-upd {
  display: inline-block; background: #2b6cb0; color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 1px 5px;
  border-radius: 3px; margin-right: 4px; vertical-align: middle;
}

/* 共通ブロック */
.block {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 6px;
  animation: fadeSlideIn 0.45s ease both;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ヘッダー */
.header {
  background: var(--white);
  text-align: center;
  padding: 4px 8px 8px;
}
.header-access {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.site-h1 {
  margin: 0 0 4px;
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
}
.site-sub, .site-en {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  color: var(--primary-light);
  margin: 2px 0;
}

/* ナビボタングリッド */
.nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.nav-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; }
.nav-btn {
  background: var(--primary-light);
  color: #fff;
  text-align: center;
  padding: 10px 6px;
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 600;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  transition: background .2s, transform .1s;
}
.nav-btn:hover { background: var(--primary); text-decoration: none; transform: translateY(-1px); }
.nav-btn.accent {
  background: var(--accent);
  font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  padding: 14px 8px;
  grid-row: span 3;
}
.nav-btn.accent:hover { background: #e0607e; }
.nav-btn.wide { grid-column: span 2; }
.dic-nav-btn { background: var(--secondary); }
.dic-nav-btn:hover { background: var(--primary); }

/* 院長・医院紹介 */
.director-wrap { background: var(--white); padding: 12px; text-align: center; }
.director-wrap img { max-width: 100%; height: auto; border-radius: 4px; }
@media (min-width: 481px) { .director-wrap img { max-width: 70%; } }
.director-link {
  display: block; background: var(--primary-light); color: #fff;
  text-align: center; padding: 10px; font-weight: 600; font-size: 1rem;
  border-radius: 6px; margin-top: 8px;
}
.director-link:hover { background: var(--primary); text-decoration: none; }
.director-profile { background: var(--white); padding: 12px 14px; text-align: left; color: var(--text); font-size: 0.97rem; }
.director-profile a {
  display: block; background: var(--primary-light); color: #fff;
  padding: 8px 12px; border-radius: 6px; margin-top: 6px; font-weight: 600; text-align: center;
}
.director-profile a:hover { background: var(--primary); text-decoration: none; }
.clinic-photo-wrap { background: #6a8bfd; padding: 8px; text-align: center; }
.clinic-photo-wrap img { max-width: 100%; height: auto; border-radius: 4px; }
.clinic-location {
  background: var(--secondary); color: #fff; text-align: center;
  padding: 8px; font-size: 1rem; font-weight: 600;
}

/* 診療時間 */
.hours-table { width: 100%; border-collapse: collapse; font-size: clamp(0.95rem, 3.5vw, 1.1rem); }
.hours-table th { background: var(--secondary); color: #fff; padding: 8px 6px; text-align: center; font-weight: 700; }
.hours-table td { background: var(--secondary); color: #fff; padding: 8px 6px; text-align: center; font-weight: 600; border-top: 1px solid rgba(255,255,255,0.3); }
.hours-table td.label { background: var(--primary-light); text-align: left; padding-left: 10px; }
.hours-note { background: var(--white); color: var(--text); padding: 8px 12px; text-align: right; font-size: 0.93rem; }

/* 連絡先・住所 */
.contact-bar { background: var(--primary-light); color: #fff; padding: 12px 14px; text-align: center; font-size: 1rem; font-weight: 600; line-height: 2; }
.contact-bar a { color: #fff; }
.address-bar { background: var(--white); color: var(--text); padding: 8px 14px; text-align: right; font-size: 0.95rem; }
.catchphrase { background: var(--accent); color: #fff; padding: 14px 12px; text-align: center; font-size: clamp(1rem, 3.5vw, 1.2rem); font-weight: 700; line-height: 1.6; }

/* メニューリスト */
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { border-top: 1px solid rgba(255,255,255,0.2); }
.menu-list li:first-child { border-top: none; }
.menu-list a { display: block; background: var(--primary-light); color: #fff; padding: 10px 14px; font-size: 1rem; }
.menu-list a:hover { background: var(--primary); text-decoration: none; }
.menu-list.alt a { background: var(--secondary); }
.menu-list.alt a:hover { background: var(--primary); }

/* 医療機器バナー */
.equipment-item { background: var(--primary-light); color: #fff; padding: 10px 12px; text-align: center; margin-bottom: 3px; border-radius: 6px; }
.equipment-item a { color: #fff; }
.equipment-item a:hover { color: #fff; }
.equipment-item img { max-width: 100%; height: auto; display: inline-block; vertical-align: middle; border-radius: 4px; margin: 4px 2px 0; }

/* 整形外科辞典 */
#部位 { width: 100%; box-sizing: border-box; }
.dic-sections-wrapper { display: block; width: 100%; }
.dic-section { margin-bottom: 4px; }
.dic-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: 4px; padding: 3px; background: #ffffff; }
.dic-nav a { background: var(--secondary); color: #fff; text-align: center; padding: 8px 4px; font-size: clamp(0.8rem, 2.5vw, 0.95rem); font-weight: 600; border-radius: 0; display: block; }
.dic-nav a:hover { background: var(--primary); text-decoration: none; }
.update-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-bottom: 4px; }
.update-links a { display: block; background: var(--secondary); color: #fff; text-align: center; padding: 8px 4px; font-size: 0.9rem; border-radius: 0; }
.update-links a:hover { background: var(--primary); text-decoration: none; }
.dic-header { background: var(--primary); color: #fff; padding: 12px 14px; font-size: clamp(1rem, 3.5vw, 1.2rem); font-weight: 700; }
.dic-intro { background: var(--white); padding: 12px 14px; color: var(--text); font-size: 0.97rem; overflow: hidden; }
.dic-intro img { float: left; max-width: 110px; height: auto; margin: 0 12px 8px 0; border-radius: 4px; }
.dic-intro p { margin: 0 0 8px; }
.dic-intro .note { color: var(--secondary); }
.dic-search-bar { background: var(--secondary); color: #fff; padding: 8px 14px; font-size: 1rem; font-weight: 600; text-align: center; }
.gcse-wrap { background: var(--white); padding: 8px 12px; }
.update-bar { background: var(--white); color: var(--text); padding: 6px 14px; text-align: center; font-weight: 600; }
.case-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; background: var(--white); }
.case-photos img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; display: block; }

/* 辞典セクション */
.dic-section-head { background: var(--primary); color: #fff; margin: 0; padding: 10px 14px; font-size: 1.05rem; font-weight: 700; border-radius: 0; }
.dic-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; background: #ffffff; }
.dic-list li { background: #f0f4ff; border: none; padding: 8px 14px; font-size: 0.97rem; line-height: 1.5; }
.dic-list li a { color: var(--primary); }
.dic-list li a:hover { color: #fff; }
.dic-sublist { list-style: none; margin: 4px 0 0 10px; padding: 0; }
.dic-sublist li { background: transparent; border-top: none; padding: 2px 0; }

/* 日常診療でよくある間違い */
.wrong-section { background: var(--primary); border-radius: var(--radius); overflow: hidden; margin-bottom: 4px; }
.wrong-section h3 { background: var(--primary); color: #fff; margin: 0; padding: 10px 14px; font-size: 1.05rem; text-align: center; }
.wrong-list { list-style: none; margin: 0; padding: 0; }
.wrong-list li { background: var(--primary-light); border-top: 1px solid rgba(255,255,255,0.2); padding: 8px 14px; }
.wrong-list li a { color: #fff; }
.wrong-list li a:hover { color: #fff; }

/* フットサル */
.futsal-section { background: var(--white); padding: 10px 14px; color: var(--text); font-size: 0.95rem; }
.futsal-photos { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.futsal-photos img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; display: block; }

/* 院内風景 */
.clinic-gallery-head { background: var(--primary); color: #fff; text-align: center; padding: 10px; font-size: 1.05rem; font-weight: 700; }
.clinic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; background: var(--secondary); }
.clinic-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; display: block; }

/* 前院長・お知らせ */
.prev-director { background: var(--white); color: var(--text); padding: 12px; text-align: center; font-size: 0.97rem; }
.prev-director img { max-width: 100%; height: auto; margin-top: 8px; border-radius: 4px; }
.info-section { background: var(--white); color: var(--text); padding: 12px 14px; font-size: 0.93rem; line-height: 1.8; }

/* トップページ レスポンシブ */
@media (max-width: 480px) {
  .nav-btn { font-size: 0.88rem; padding: 9px 4px; }
  .nav-btn.accent { font-size: 1.2rem; }
  .dic-nav a { font-size: 0.82rem; padding: 7px 2px; }
  .dic-nav { grid-template-columns: repeat(3, 1fr); }
  .update-links { grid-template-columns: repeat(2, 1fr); }
  .clinic-grid img { height: 90px; }
  .case-photos img { height: 110px; }
}


/* ═══════════════════════════════════════════════════════════
   サブページ共通（body.page-sub）
   mask.html / web_reservation.html 等
═══════════════════════════════════════════════════════════ */
body.page-sub {
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  background-color: #f8f9fa;
  color: #222;
  line-height: 1.8;
}
body.page-sub a { text-decoration: none; color: #456ffc; }

.wrap { width: 100%; max-width: 1200px; margin: 40px auto; padding: 16px 24px; box-sizing: border-box; }
.breadcrumb { font-size: 13px; color: #666; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.breadcrumb .bc-reserve {
  display: inline-block; background: #fe81ac; color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 6px; text-decoration: none;
  transition: background-color 0.2s;
}
.breadcrumb .bc-reserve:hover { background: #e8709a; }

.welcome-box { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); overflow: hidden; animation: fadeIn 0.8s ease; max-width: 800px; margin: 0 auto; }
.welcome-title { background-color: #456ffc; color: #fff; padding: 12px; font-size: 20px; text-align: center; }
.welcome-title a { color: #fff; }
body.page-sub .welcome-title a { color: #fff; }
.welcome-message { background-color: #fe81ac; color: #fff; padding: 8px 12px; font-size: 16px; text-align: center; line-height: 1.4; margin: 4px 0; }
.welcome-dept { background-color: #456ffc; color: #fff; padding: 10px; font-size: 16px; text-align: center; }

body.page-sub h1 { font-size: 24px; margin: 1.2rem 0 1rem; color: #456ffc; text-align: left; }
body.page-sub h2 { font-size: 20px; margin: 1.2rem 0 .6rem; color: #333; text-align: left; }

.list { list-style: none; padding-left: 0; margin: .3rem 0 1rem 0; }
.list li { position: relative; padding-left: 1.2em; margin: .35rem 0; }
.list li::before { content: "•"; position: absolute; left: 0; top: 0; line-height: 1.8; }

.notice-list { list-style: none; padding-left: 0; margin: .3rem 0 1rem 0; }
.notice-list li { position: relative; padding-left: 1.4em; margin: .5rem 0; }
.notice-list li::before { content: "■"; position: absolute; left: 0; top: 0; line-height: 1.8; color: #456ffc; }

.emph { background: #f3f9ff; border: 1px solid #cfe8ff; border-radius: 6px; padding: 0.8rem; margin: 1rem 0; }
.emph h2 { margin-top: 0; }
.emph .list { margin-left: 0; }

.lang-blocks { display: flex; gap: 40px; align-items: flex-start; padding: 24px; box-sizing: border-box; }
.lang-blocks section { flex: 1; min-width: 0; }
.en { color: #444; font-size: 95%; }

body.page-sub .reserve-btn {
  display: block; width: 90%; max-width: 380px; margin: 1.5rem auto; padding: 16px 24px;
  background-color: #fe81ac; color: #fff; text-align: center; text-decoration: none;
  font-size: 18px; font-weight: bold; border-radius: 8px;
  box-shadow: 0 3px 8px rgba(254,129,172,0.3); transition: background-color 0.2s, box-shadow 0.2s;
  line-height: 1.4; box-sizing: border-box;
}
body.page-sub .reserve-btn:hover { background-color: #e8709a; color: #fff; box-shadow: 0 4px 12px rgba(254,129,172,0.45); }
.reserve-btn small { display: block; font-size: 14px; font-weight: normal; margin-top: 2px; color: #fff; }

.related-links { margin: 1.5rem 0 1rem; }
.system-note { font-size: 13px; color: #888; text-align: center; margin: 1rem 0 0.5rem; }
.system-note a { color: #888; }

/* サブページ レスポンシブ */
@media screen and (max-width: 768px) {
  .wrap { margin: 20px auto; padding: 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .lang-blocks { flex-direction: column; gap: 24px; padding: 12px; }
  body.page-sub h1 { font-size: 20px; }
  body.page-sub h2 { font-size: 18px; }
  .reserve-btn { font-size: 16px; padding: 14px 20px; }
}

/* ─── サブページ画像・iframe ─── */
.sub-topbar {
  font-size: 13px; color: #666; margin-bottom: 16px; padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}
.sub-topbar a { color: #456ffc; font-weight: 600; }

body.page-sub img.center { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 1rem auto; }
body.page-sub iframe.gmap { width: 100%; height: 400px; border: 0; border-radius: 6px; margin: 1rem 0; display: block; }
body.page-sub .float-img { float: left; max-width: 160px; height: auto; margin: 0 16px 12px 0; border-radius: 6px; }

/* ─── クレジットページ ─── */
.payment-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 1rem 0;
}
.payment-item {
  background: #456ffc; color: #fff; border-radius: 6px;
  padding: 10px 14px; font-size: 1rem; font-weight: 500; text-align: center;
}

/* ─── レビュー ─── */
.review-header { font-size: 0.9rem; color: #888; margin-bottom: 2px; }
.reviewer-name { font-weight: 700; }

@media screen and (max-width: 768px) {
  .payment-grid { grid-template-columns: 1fr; }
  body.page-sub iframe.gmap { height: 280px; }
  body.page-sub .float-img { float: none; display: block; max-width: 200px; margin: 0 auto 12px; }
}

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