/* 3案共通のリセットと部品。色と書体は palette.css の変数だけを使う（直書きしない） */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, table { margin: 0; }
figure, blockquote { margin-inline: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: var(--lh-head); font-weight: 700; }
table { border-collapse: collapse; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nb { display: inline-block; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--wrap-narrow) + var(--gutter) * 2); }

/* ボタン（3案で同じ形） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--btn-h); padding: 0 var(--btn-pad-x);
  border-radius: var(--btn-radius); border: 2px solid var(--color-main);
  background: var(--color-main); color: var(--color-bg);
  font-family: var(--font-heading); font-size: var(--btn-fs); font-weight: var(--btn-weight); letter-spacing: .06em;
  transition: background var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out), transform var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -12px var(--color-main); }
.btn .arw { display: inline-block; width: 18px; height: 2px; background: currentColor; position: relative; transition: width var(--dur-hover) var(--ease-out); }
.btn .arw::after { content: ""; position: absolute; right: 0; top: -4px; width: 9px; height: 9px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transform-origin: right top; top: 0; }
.btn:hover .arw { width: 28px; }
.btn--outline { background: transparent; color: var(--color-main); }
.btn--outline:hover { background: var(--color-main); color: var(--color-bg); }
.btn--accent { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn--light { background: var(--color-bg); border-color: var(--color-bg); color: var(--color-main); }
.btn--sm { min-height: 48px; padding: 0 24px; font-size: 16px; }
.tel-num { font-family: var(--font-heading); font-weight: 700; letter-spacing: .04em; white-space: nowrap; }

/* 表（診療時間・料金） */
.tbl { width: 100%; font-size: var(--fs-card); background: var(--color-bg); }
.tbl th, .tbl td { padding: 14px 16px; border-bottom: 1px solid var(--color-line, rgba(0,0,0,.12)); text-align: left; vertical-align: top; }
.tbl thead th { background: var(--color-main); color: var(--color-bg); font-weight: 700; border-bottom: 0; }
.tbl--hours th, .tbl--hours td { text-align: center; }
.tbl--hours tbody th { text-align: left; white-space: nowrap; }
.tbl .ok { color: var(--color-sub); font-weight: 700; font-size: 1.15em; }
.tbl .off { color: var(--color-text); opacity: .45; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > .tbl { min-width: 560px; }
.note { font-size: var(--fs-small); opacity: .85; }

/* 地図の枠（サンプルなので灰色の枠） */
.map-box { display: grid; place-items: center; min-height: 320px; background: #d9d9d9; color: #555; font-size: 20px; letter-spacing: .3em; border-radius: var(--radius-m); }

/* スマホのメニュー（閉じているときは visibility で隠す。横はみ出しを作らない） */
.sp-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--color-bg);
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease-out), visibility .5s;
}
.is-menu-open .sp-menu { opacity: 1; visibility: visible; }
.sp-menu li a { display: block; padding: 18px 4px; border-bottom: 1px solid var(--color-line, rgba(0,0,0,.12)); font-size: 18px; font-weight: 700; font-family: var(--font-heading); }
.sp-menu .btn { width: 100%; margin-top: 20px; }
.menu-btn { display: none; width: 52px; height: 52px; border-radius: 50%; background: var(--color-main); position: relative; z-index: 95; }
.menu-btn span { position: absolute; left: 15px; width: 22px; height: 2px; background: var(--color-bg); transition: transform .4s var(--ease-out), opacity .3s; }
.menu-btn span:nth-child(1) { top: 19px; } .menu-btn span:nth-child(2) { top: 25px; } .menu-btn span:nth-child(3) { top: 31px; }
.is-menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.is-menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.is-menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* スマホの固定バー（電話・Web予約） */
.sp-bar { display: none; }
@media (max-width: 1100px) {
  .menu-btn { display: block; }
}
@media (max-width: 767px) {
  .sp-bar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: var(--color-bg); box-shadow: 0 -6px 20px rgba(0,0,0,.08);
  }
  .sp-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; font-weight: 700; font-size: 16px; font-family: var(--font-heading); }
  .sp-bar a:first-child { color: var(--color-main); }
  .sp-bar a:last-child { background: var(--color-main); color: var(--color-bg); }
  body { padding-bottom: 60px; }
}

/* パンくず（下層） */
.crumbs { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: .5; }

/* 動きを止める人には止めた状態で全部見せる */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
