/* ============================================================
 * 全ヘッダー共通の追加部品(2026-10-09 ユーザー指示。PHPは inc/site-chrome-extras.php)
 * 1. 「むらつ歯科クリニック総合トップへ」(ハンバーガーメニューの先頭・PCは右下の「ご予約はこちら」の左隣)
 * 2. 併設技工所・ホワイトニング情報ページのスマホ用メニュー
 * 3. スマホでFVを過ぎたらロゴを小さくしてヘッダーの高さを詰める(<html> の mu-past-fv。assets/js/site-chrome-extras.js)
 * base.css は版の番号が固定でブラウザに古いものが残るため、このファイル(更新時刻つきで読む)に置いている。
 * ============================================================ */

/* ---------- 1. 総合トップへ ---------- */
.mu-sitetop-link { display: flex; align-items: center; gap: 8px; color: #0D899C; font-weight: 700; text-decoration: none; line-height: 1.4; }
.mu-sitetop-icon { flex: 0 0 auto; }
.mu-sitetop-text { word-break: keep-all; overflow-wrap: anywhere; }
/* 左から開くメニュー(虫歯治療・予防歯科・噛み合わせ・併設技工所・ホワイトニング)。見出し「MENU」のすぐ下 */
body .mu-sitetop-link--drawer { margin: 14px 0 6px; padding: 12px 14px; border-radius: 10px; background: #EAF4F4; color: #0D899C; font-size: 15px; }
/* 共通ヘッダー(トップ以外の医院紹介・ドクター等)の下に開くメニュー */
.tf-mobile-panel a.mu-sitetop-link--tf { padding: 10px 14px; border-radius: 10px; background: #EAF4F4; color: #0D899C; font-size: 15px; font-family: inherit; }
/* 歯周病の下に開くメニュー */
body.sp-site--periodontal .pd-spmenu .mu-sitetop-link--pd { margin: 4px 0 6px; padding: 12px 14px; border-radius: 10px; background: #EAF4F4; color: #0D899C; font-size: 15px; }

/* PC:画面右下の「ご予約はこちら」(幅168px・右22px)の左隣。スマホ(640px以下)は下端の予約バーになるので出さない */
.mu-sitetop-float {
  position: fixed; right: calc(22px + 168px + 12px); bottom: 22px; z-index: 250;
  display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 18px; box-sizing: border-box;
  border: 1.5px solid #0D899C; border-radius: 8px; background: #FFFFFF; color: #0D899C;
  font-size: 13.5px; font-weight: 700; line-height: 1.3; text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(27,53,84,0.18); transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .15s ease;
}
.mu-sitetop-float:hover, .mu-sitetop-float:focus-visible { background: #0D899C; color: #FFFFFF; }
@media (hover: hover) {
  .mu-sitetop-float:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27,53,84,0.22); }
}
/* ホワイトニング情報ページは右下の予約ボタンを出していないので、右端に寄せる */
body.sp-site--whitening .mu-sitetop-float { right: 22px; }
@media (max-width: 640px) { .mu-sitetop-float { display: none; } }
@media print { .mu-sitetop-float { display: none; } }

/* ---------- 1-2. 共通ヘッダーの予約ボタン: 虫歯治療のスマホのヘッダーの「予約・相談」と同じ四角(2026-10-09 ユーザー指示「これ可愛いから」)
   色は base.css、斜めのグラデーション・上端のツヤ・ホバーの動きは button-depth.css(トップ・別案ページの分も 2026-10-13 にまとめた)のまま。形だけ変える ---------- */
/* PC(761px以上)は今までどおり横長の「WEB予約 →」(2026-10-10 ユーザー指摘「PC版も小さくなっちゃってる」)。四角はスマホだけ */
.tf-nav-cta--tile .mu-tile-icon, .tf-nav-cta--tile .tf-cta-sp { display: none; }
@media (max-width: 767px) {
  .tf-header .tf-nav-cta.tf-nav-cta--tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    box-sizing: border-box; width: 52px; height: 52px; padding: 0; border-radius: 5px;
    font-size: 10px; font-weight: 700; line-height: 1.2; letter-spacing: 0; white-space: nowrap; text-align: center;
  }
  .tf-nav-cta--tile .tf-cta-pc { display: none; }
  .tf-nav-cta--tile .mu-tile-icon { display: block; width: 22px; height: 22px; }
  .tf-nav-cta--tile .tf-cta-sp { display: inline; }
}

/* ---------- 2. 併設技工所・ホワイトニング情報ページのスマホ用メニュー ---------- */
.mu-menu-btn { display: none; }
@media (max-width: 767px) {
  .mu-menu-btn {
    order: -1; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    width: 48px; height: 48px; padding: 0; border: 0; background: transparent; cursor: pointer;
    font-family: inherit; font-size: 10px; font-weight: 700; letter-spacing: .08em; line-height: 1;
  }
  /* メニューボタンが出る幅では横のページ切替は出さない(虫歯治療などと同じ。ページはMENUの中から選ぶ) */
  .mdl-gnav, .whs .wh-gnav { display: none; }
  .mdl .mu-menu-btn { color: #b9e5e4; }
  .mdl-head-inner { column-gap: 8px; }
  .mdl-logo-ja { white-space: nowrap; }
  .whs .wh-header .mu-menu-btn { color: #163f59; }
  .whs .wh-header .header-inner { gap: 10px; }
  .whs .wh-header .brand { margin-right: auto; }
}
.mu-drawer { position: fixed; inset: 0; z-index: 400; display: flex; }
.mu-drawer[hidden] { display: none; }
.mu-drawer .mu-drawer-shade { position: absolute; inset: 0; background: rgba(18,60,66,.35); }
.mu-drawer .mu-drawer-panel {
  position: relative; box-sizing: border-box; width: min(84vw, 340px); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 20px 32px; background: #fff; box-shadow: 12px 0 40px rgba(18,60,66,.15);
  color: #123C42; font-family: var(--font-sans); line-height: 1.5; text-align: left;
}
.mu-drawer .mu-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; border-bottom: 1px solid #DCEBEB; }
.mu-drawer .mu-drawer-label { color: #0D899C; font-size: 18px; letter-spacing: .14em; }
.mu-drawer .mu-drawer-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #123C42; cursor: pointer; }
.mu-drawer .mu-drawer-link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-bottom: 1px solid #DCEBEB; color: #123C42; font-size: 16px; font-weight: 700; text-decoration: none; }
.mu-drawer .mu-drawer-link[aria-current="page"] { color: #0D899C; }
.mu-drawer .mu-drawer-link span { color: #7FB9BC; font-size: 24px; line-height: 1; }

/* 併設技工所: メニューボタンの分だけ狭くなるので、幅の狭いスマホではロゴの「ML」の印を省いて名前を1行に収める */
@media (max-width: 420px) {
  .mdl-logo-mark { display: none; }
  .mdl-logo-ja { font-size: 14px; }
  .mdl .mdl-head-cta { padding-left: 10px; padding-right: 10px; }
}

/* ---------- 3. スマホでFVを過ぎたらロゴを小さく・ヘッダーを低く ---------- */
.tf-logo-box img, .cr-logo-sp img, .pvh-logo-sp img, .pd-logo img, .oc-logo-sp img, .whs .wh-header .brand img { transition: height .2s ease, width .2s ease; }

/* 共通ヘッダー(トップ・医院紹介・ドクター等)。760px以下は「メニュー|ロゴ|予約」の1行(2026-10-09 ユーザー指示「フロントページのヘッダーも1行に」)。
   以前は ロゴの段+メニュー・予約の段 の2段(base.css)で約130pxあった。虫歯治療のスマホのヘッダーと同じ並び */
@media (max-width: 767px) {
  .tf-header { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 8px; padding: 8px 12px; }
  .tf-header .tf-hamburger { grid-column: 1; grid-row: 1; justify-content: center; }
  .tf-header .tf-logo-box { grid-column: 2; grid-row: 1; justify-content: center; min-width: 0; }
  .tf-header .tf-logo-box img { width: min(100%, 214px); height: auto; }
  .tf-header .tf-nav { grid-column: 3; grid-row: 1; justify-self: end; margin-left: 0; }
  /* トップのFVはヘッダーの高さを使う(front-page.css)。JSが実測するまでの目安も1行の高さにする */
  :root { --tf-header-h: 69px; }

  html.mu-past-fv .tf-header { padding-top: 4px; padding-bottom: 4px; }
  html.mu-past-fv .tf-header .tf-logo-box img { width: min(100%, 168px); }
  html.mu-past-fv .tf-header .tf-nav-cta.tf-nav-cta--tile { height: 44px; }
}

/* 虫歯治療・予防歯科(767px以下) */
@media (max-width: 767px) {
  html.mu-past-fv body.sp-site--caries .cr-header-sp,
  html.mu-past-fv body.sp-site--preventive .pvh-header-sp { padding-top: 4px; padding-bottom: 4px; }
  html.mu-past-fv body.sp-site--caries .cr-menu-btn,
  html.mu-past-fv body.sp-site--caries .cr-header-sp-reserve,
  html.mu-past-fv body.sp-site--preventive .pvh-menu-btn,
  html.mu-past-fv body.sp-site--preventive .pvh-header-sp-reserve { height: 44px; }
  html.mu-past-fv body.sp-site--caries .cr-logo-sp img,
  html.mu-past-fv body.sp-site--preventive .pvh-logo-sp img { height: 17px; }
  html.mu-past-fv body.sp-site--caries .cr-logo-sp .cr-logo-sub,
  html.mu-past-fv body.sp-site--preventive .pvh-logo-sp .pvh-logo-sub { font-size: 10px; }
}

/* 歯周病・噛み合わせ(959px以下) */
@media (max-width: 959px) {
  html.mu-past-fv body.sp-site--periodontal .pd-header-in { padding-top: 4px; padding-bottom: 4px; }
  html.mu-past-fv body.sp-site--periodontal .pd-burger,
  html.mu-past-fv body.sp-site--periodontal .pd-header-sp-reserve { height: 44px; }
  html.mu-past-fv body.sp-site--periodontal .pd-logo img { height: 17px; }
  html.mu-past-fv body.sp-site--periodontal .pd-logo-sub { font-size: 10px; }

  html.mu-past-fv body.sp-site--occlusion .oc-header-sp { padding-top: 4px; padding-bottom: 4px; }
  html.mu-past-fv body.sp-site--occlusion .oc-logo-sp img { height: 17px; }
  html.mu-past-fv body.sp-site--occlusion .oc-header-sp-cta { min-height: 34px; }
}

/* 併設技工所・ホワイトニング情報ページ(767px以下) */
@media (max-width: 767px) {
  html.mu-past-fv .mdl-head-inner { padding-top: 4px; padding-bottom: 4px; }
  html.mu-past-fv .mdl-logo-mark { flex-basis: 24px; width: 24px; height: 24px; font-size: 9px; }
  html.mu-past-fv .mdl-logo-ja { font-size: 13px; }
  html.mu-past-fv .mdl-logo-en { display: none; }
  html.mu-past-fv .mdl .mdl-head-cta { padding-top: 3px; padding-bottom: 3px; }
  html.mu-past-fv .mdl .mu-menu-btn { height: 40px; }

  html.mu-past-fv .whs .wh-header .header-inner { min-height: 48px; }
  html.mu-past-fv .whs .wh-header .brand img { width: 140px; }
  html.mu-past-fv .whs .wh-header .reserve { padding-top: 6px; padding-bottom: 6px; }
  html.mu-past-fv .whs .wh-header .mu-menu-btn { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .tf-logo-box img, .cr-logo-sp img, .pvh-logo-sp img, .pd-logo img, .oc-logo-sp img, .whs .wh-header .brand img { transition: none; }
}
