/* ことり坂整骨院 — のれんの深い緑を院の色に */
:root {
  --noren: #1e4a38;
  --noren-deep: #153528;
  --paper: #f5f7f1;
  --wash: #e6ece2;
  --ink: #1b2520;
  --sub: #4d5a53;
  --line: #c3cdc2;
  --yamabuki: #e8a81c;
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", "Noto Sans CJK JP", Meiryo, sans-serif;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  padding-bottom: 84px; /* 下に固定した電話ボタンのぶん */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  line-break: strict;
  word-break: auto-phrase; /* 対応ブラウザでは文節で折り返す */
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--noren); }
a:focus-visible { outline: 3px solid var(--yamabuki); outline-offset: 3px; }
svg { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* ---------- のれん（トップ） ---------- */
.hero { padding-top: 18px; text-align: center; }

.noren { display: block; position: relative; max-width: 520px; margin: 0 auto; padding: 0 22px; }
.noren::before { /* のれん棒 */
  content: "";
  position: absolute; left: 8px; right: 8px; top: 7px;
  height: 7px; border-radius: 4px;
  background: #6b4a2b;
  z-index: 1;
}
.noren-top { height: 26px; background: var(--noren); }
.noren-panels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.noren-panels span {
  display: flex; align-items: center; justify-content: center;
  height: 132px; padding-bottom: 10px;
  background: var(--noren);
  color: #fff;
  font-family: var(--mincho); font-weight: 600;
  font-size: clamp(44px, 14vw, 64px); line-height: 1;
  transform-origin: top center;
  animation: sway 2.4s ease-out 1 both;
}
.noren-panels span:nth-child(2) { animation-delay: .08s; }
.noren-panels span:nth-child(3) { animation-delay: .16s; }
.noren-panels span:nth-child(4) { animation-delay: .24s; }
@keyframes sway {
  0% { transform: skewX(-5deg); }
  35% { transform: skewX(3deg); }
  65% { transform: skewX(-1.5deg); }
  100% { transform: skewX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .noren-panels span { animation: none; }
}

.hero-name {
  display: block;
  margin-top: 14px;
  color: var(--noren);
  font-family: var(--mincho); font-weight: 600;
  font-size: 34px; line-height: 1.2;
  letter-spacing: .5em; padding-left: .5em; /* 字間ぶんの中央ずれを戻す */
}
.hero-yomi { margin-top: 6px; color: var(--sub); font-size: 14px; letter-spacing: .12em; }

.hero-word {
  margin-top: 30px;
  font-family: var(--mincho); font-weight: 600;
  font-size: 25px; line-height: 1.6;
}
.hero-word span, .k { display: inline-block; }

/* ---------- 電話 ---------- */
.call { margin-top: 28px; padding: 22px 16px 24px; background: var(--noren); color: #fff; text-align: center; border-radius: 4px; }
.call-lead { font-size: 18px; font-weight: 700; }
.call-number {
  display: block; margin-top: 2px; padding: 5px 0;
  color: #fff; text-decoration: none;
  font-size: clamp(24px, 7.9vw, 44px); font-weight: 800; line-height: 1.25;
  letter-spacing: .02em; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.call-number small { font-size: .6em; font-weight: 700; margin-right: .2em; }
.call-note { margin-top: 10px; font-size: 15px; line-height: 1.7; color: #dfe9e2; }
.call-urgent {
  display: inline-block; margin-top: 14px; padding: 6px 14px;
  background: var(--yamabuki); color: #1b2520;
  font-weight: 700; font-size: 17px; border-radius: 3px;
}

/* ---------- 見出しと本文 ---------- */
.block { padding-top: 52px; }
.block h2 {
  font-family: var(--mincho); font-weight: 600;
  font-size: 27px; line-height: 1.4;
  color: var(--noren);
  padding-bottom: 10px; margin-bottom: 18px;
  border-bottom: 3px solid var(--noren);
}
.block h3 { font-size: 19px; line-height: 1.5; margin: 30px 0 8px; }
.block p + p { margin-top: 12px; }
.note { color: var(--sub); font-size: 15px; line-height: 1.75; }
.page-title {
  padding-top: 30px;
  font-family: var(--mincho); font-weight: 600;
  font-size: 30px; line-height: 1.35;
}

/* ---------- 受付時間の図 ---------- */
.hours { margin-top: 6px; }
.hrow { padding: 13px 0 14px; border-bottom: 1px solid var(--line); }
.hrow-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.hday { font-weight: 700; font-size: 18px; min-width: 6.2em; }
.htime { font-size: 18px; font-variant-numeric: tabular-nums; }
.htime b { font-weight: 700; white-space: nowrap; }
.hmemo { flex-basis: 100%; color: var(--sub); font-size: 15px; line-height: 1.6; }
.hbar {
  position: relative; height: 12px; margin-top: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 11 - 1px), #fff calc(100% / 11 - 1px), #fff calc(100% / 11)),
    var(--wash);
}
.hbar i {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--s) / 11 * 100%);
  width: calc((var(--e) - var(--s)) / 11 * 100%);
  background: var(--noren);
}
.hbar i.some {
  background: repeating-linear-gradient(135deg, var(--noren) 0 5px, #8fae9c 5px 9px);
}
.haxis { position: relative; height: 22px; margin-top: 6px; color: var(--sub); font-size: 13px; }
.haxis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.haxis span:first-child { transform: none; }
.haxis span:last-child { transform: translateX(-100%); }
.closed { color: var(--sub); }

/* ---------- 一覧（料金など） ---------- */
.price { border-top: 1px solid var(--line); }
.price li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.price .what { font-weight: 700; }
.price .what small { display: block; font-weight: 400; font-size: 15px; color: var(--sub); line-height: 1.5; }
.price .yen { flex: none; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price .yen small { font-size: 14px; font-weight: 400; }

.callout { margin-top: 18px; padding: 16px 18px; background: var(--wash); border-left: 6px solid var(--noren); }
.callout strong { display: block; font-size: 19px; line-height: 1.5; }

.plain li { position: relative; padding-left: 1.1em; }
.plain li + li { margin-top: 6px; }
.plain li::before { content: ""; position: absolute; left: 0; top: .78em; width: .45em; height: .45em; background: var(--noren); border-radius: 50%; }

/* ---------- 経歴 ---------- */
.career { margin-top: 14px; border-left: 2px solid var(--noren); }
.career li { position: relative; padding: 0 0 14px 18px; line-height: 1.6; }
.career li:last-child { padding-bottom: 0; }
.career li::before { content: ""; position: absolute; left: -6px; top: .55em; width: 10px; height: 10px; background: var(--paper); border: 2px solid var(--noren); border-radius: 50%; }
.career time, .career .yr { display: block; color: var(--sub); font-size: 15px; font-variant-numeric: tabular-nums; }

.gyotaku { margin-top: 22px; display: flex; align-items: center; gap: 16px; }
.gyotaku svg { flex: none; width: 112px; }

/* ---------- よくある質問 ---------- */
.faq div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.faq div:first-child { border-top: 1px solid var(--line); }
.faq dt { font-weight: 700; font-size: 18px; line-height: 1.55; padding-left: 1.5em; text-indent: -1.5em; }
.faq dt::before { content: "Q"; display: inline-block; width: 1.5em; text-indent: 0; color: var(--noren); font-family: var(--mincho); font-size: 1.1em; }
.faq dd { margin-top: 6px; padding-left: 1.5em; }

/* ---------- 行き方 ---------- */
.steps { counter-reset: step; margin-top: 16px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 46px; line-height: 1.65; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--noren); color: #fff;
  font-weight: 700; text-align: center; line-height: 32px;
}
.map { margin-top: 8px; background: #fff; border: 1px solid var(--line); }
.map svg { width: 100%; max-width: 440px; margin: 0 auto; }
.map figcaption { padding: 8px 12px 10px; }
.address { font-size: 19px; font-weight: 700; line-height: 1.6; }

/* ---------- 次のページへ ---------- */
.next { margin-top: 44px; display: grid; gap: 10px; }
.next a {
  display: block; padding: 15px 18px;
  border: 2px solid var(--noren); border-radius: 4px;
  color: var(--noren); font-weight: 700; text-decoration: none;
  background: #fff;
}
.next a small { display: block; font-weight: 400; color: var(--sub); font-size: 15px; line-height: 1.5; }

/* ---------- 下層ページの頭 ---------- */
.top { background: var(--noren); }
.top a.home {
  display: block; padding: 14px 20px 10px;
  color: #fff; text-decoration: none; text-align: center;
  font-family: var(--mincho); font-weight: 600; font-size: 22px; letter-spacing: .14em;
}
.hem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 12px; background: var(--paper); max-width: 100%; }
.hem i { background: var(--noren); }

nav.tabs { background: var(--paper); border-bottom: 1px solid var(--line); }
nav.tabs ul { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 640px; margin: 0 auto; }
nav.tabs a {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 6px 4px;
  color: var(--ink); text-decoration: none; text-align: center;
  font-size: 15px; font-weight: 700; line-height: 1.35;
  border-bottom: 4px solid transparent;
}
nav.tabs a[aria-current="page"] { color: var(--noren); border-bottom-color: var(--noren); }
.hero + nav.tabs, nav.tabs.after-hero { margin-top: 30px; border-top: 1px solid var(--line); }

/* ---------- 足もと ---------- */
footer { margin-top: 60px; padding: 30px 0 34px; background: var(--wash); font-size: 15px; line-height: 1.8; }
footer .fname { font-family: var(--mincho); font-weight: 600; font-size: 20px; color: var(--noren); }
footer ul { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer ul a { display: inline-block; padding: 10px 0; }

/* ---------- 画面の下に固定した電話ボタン ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(245, 247, 241, .96);
  border-top: 1px solid var(--line);
}
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  max-width: 616px; margin: 0 auto; min-height: 56px; padding: 6px 10px;
  background: var(--noren); color: #fff; text-decoration: none;
  border-radius: 4px; line-height: 1.2;
}
.callbar .lbl { font-size: 14px; font-weight: 700; white-space: nowrap; }
.callbar .num { font-size: 24px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (min-width: 700px) {
  .hem { display: none; }
  .top a.home { padding-bottom: 14px; }
  body { font-size: 18px; }
  .noren-panels span { height: 160px; }
  .hero-word { font-size: 30px; }
}
