:root {
  --base: #faf6ee;
  --surface: #ffffff;
  --alt: #f1e9d8;
  --ink: #33302a;
  --main: #4a3a26;
  --accent: #8a5a2b;
  --sub: #5f594d;
  --line: #e2d8c2;
  --cta: #9e3b26;
  --radius: 14px;
}

* { box-sizing: border-box; }

/* M6 なめらかなページ内スクロール（動きOKのときだけ） */
html.js-motion { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 500;
  padding-bottom: 64px;
}

img { max-width: 100%; height: auto; display: block; }

/* ---------- リンクとボタンの反応（共通の標準仕様） ---------- */
a {
  color: var(--accent);
  transition: color .2s cubic-bezier(.25,.7,.3,1);
}
a:hover { color: var(--main); }
a:active { color: var(--main); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* テキストリンクは「色と下線」で反応する */
main p a, .chapter-text a, .chapter-index a, .header-tel a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(138, 90, 43, .45);
  text-underline-offset: 4px;
  transition: color .2s cubic-bezier(.25,.7,.3,1), text-decoration-color .2s cubic-bezier(.25,.7,.3,1), opacity .2s cubic-bezier(.25,.7,.3,1);
}
main p a:hover, .chapter-text a:hover, .chapter-index a:hover, .header-tel a:hover {
  text-decoration-color: var(--main);
}
.chapter-index a:active, .header-tel a:active { color: var(--main); opacity: .72; }
main p a:active, .chapter-text a:active { opacity: .72; }

.sample-banner {
  background: var(--main);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- 進み表示（プログレスバー）と現在の章 ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(74, 58, 38, .12);
  z-index: 60;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}
.chapter-chip {
  position: fixed;
  top: 14px; right: 12px;
  z-index: 59;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(51, 48, 42, .14);
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--main);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: "Shippori Mincho", serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--main);
}
.logo a { color: var(--main); text-decoration: none; }

.header-tel { margin: 0; font-weight: 700; }
.header-tel a { color: var(--main); font-size: 15px; }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- ヒーロー（序章） ---------- */
.hero { padding: 18px 0 8px; }

.open-chip {
  display: inline-block;
  background: var(--alt);
  border: 1px solid var(--line);
  color: var(--main);
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 5px 16px;
  margin: 0 0 14px;
}

.hero h1 {
  font-family: "Shippori Mincho", serif;
  font-size: 32px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--main);
  margin: 0 0 14px;
}

.hero-sub { margin: 0 0 22px; max-width: 44em; }

.hero-photo { border-radius: var(--radius); overflow: hidden; }
.hero-photo img { width: 100%; }

.photo-note { font-size: 13px; color: var(--sub); margin: 8px 0 0; }

.summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 22px 0 0;
}
.summary div { background: var(--surface); padding: 12px 16px; }
.summary dt { font-size: 13px; color: var(--sub); font-weight: 700; }
.summary dd { margin: 0; font-weight: 700; color: var(--main); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--main);
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.25,.7,.3,1), box-shadow .2s cubic-bezier(.25,.7,.3,1), background-color .2s cubic-bezier(.25,.7,.3,1);
}
.btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(51, 48, 42, .22);
}
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-tel { background: var(--cta); }
.btn-ghost {
  background: var(--surface);
  color: var(--main);
  border: 2px solid var(--main);
}
.btn-ghost:hover { color: var(--main); background: var(--alt); }

.chapter-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

/* ---------- 章 ---------- */
.chapter { padding: 58px 0 6px; }

.chapter-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.chapter-num {
  font-family: "Shippori Mincho", serif;
  font-size: 44px;
  font-weight: 700;
  color: #ffffff;
  background: var(--main);
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  flex: none;
}

.sec-label {
  font-size: 13px;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 2px;
}
.sec-title {
  font-family: "Shippori Mincho", serif;
  font-size: 25px;
  font-weight: 700;
  color: var(--main);
  margin: 0;
  line-height: 1.5;
}

.chapter-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.chapter-photo { border-radius: var(--radius); overflow: hidden; }
.chapter-photo img { width: 100%; height: 100%; object-fit: cover; }
.chapter-text p { margin: 0 0 14px; }
.chapter-text p:last-child { margin-bottom: 0; }

/* ---------- 数字（第3章の実績） ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 10px 14px;
  text-align: center;
}
.stat-num {
  font-family: "Shippori Mincho", serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--main);
  margin: 0;
  line-height: 1.2;
}
.stat-unit { font-size: 19px; margin-left: 2px; }
.stat-label { font-size: 13px; color: var(--sub); font-weight: 700; margin: 4px 0 0; }
.stats-note { font-size: 13px; color: var(--sub); margin: 10px 0 0; }

/* ---------- ブロック共通 ---------- */
.block { padding: 58px 0 6px; }
.block .sec-title { margin-bottom: 18px; }

.works-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.work-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.25,.7,.3,1), box-shadow .25s cubic-bezier(.25,.7,.3,1);
}
.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(51, 48, 42, .13);
}
.work-photo { aspect-ratio: 3 / 2; overflow: hidden; }
.work-photo img { width: 100%; height: 100%; object-fit: cover; }
.work-card h3 {
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  color: var(--main);
  margin: 0;
  padding: 16px 18px 4px;
  line-height: 1.55;
}
.work-card p { margin: 0; padding: 0 18px 18px; font-size: 15px; }

table.menu, table.info {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table.menu th, table.info th {
  text-align: left;
  font-weight: 700;
  color: var(--main);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  width: 58%;
}
table.menu td {
  text-align: right;
  font-weight: 700;
  font-size: 18px;
  color: var(--main);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.info td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.menu tr:last-child th, table.menu tr:last-child td,
table.info tr:last-child th, table.info tr:last-child td { border-bottom: none; }
table.menu small { display: block; font-weight: 500; color: var(--sub); font-size: 13px; }
.menu-note { font-size: 14px; color: var(--sub); margin: 12px 0 0; }

.cta-band {
  margin-top: 58px;
  background: var(--main);
  color: #ffffff;
  border-radius: var(--radius);
  text-align: center;
  padding: 34px 20px 38px;
}
.cta-band p { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.cta-band .hours { font-size: 14px; font-weight: 500; margin: 0 0 20px; }

footer {
  margin-top: 64px;
  background: #2b251c;
  color: #e9e2d2;
}
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 30px 20px 38px; }
.footer-logo {
  font-family: "Shippori Mincho", serif;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}
footer p { margin: 0 0 8px; font-size: 14px; }
.credits { font-size: 12px; color: #bdb098; }

.cta-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 50;
}
.cta-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  font-weight: 700;
  font-size: 16px;
  color: var(--main);
  text-decoration: none;
  transition: background-color .2s cubic-bezier(.25,.7,.3,1), transform .15s cubic-bezier(.25,.7,.3,1);
}
.cta-bar a:active { transform: scale(.97); background: var(--alt); }
.cta-bar .cta-tel { background: var(--cta); color: #ffffff; }
.cta-bar .cta-tel:active { background: var(--cta); }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .cta-bar { display: none; }
  .hero h1 { font-size: 40px; }
  .summary { grid-template-columns: repeat(4, 1fr); }
  .chapter-body { grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; }
  .chapter-body.flip .chapter-photo { order: 2; }
  .works-grid { grid-template-columns: repeat(3, 1fr); }
  .sec-title { font-size: 28px; }
}

/* ---------- 動き（M2 出現フェード） ---------- */
.js-motion .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: var(--d, 0s);
}
.js-motion .rv.on { opacity: 1; transform: none; }

/* ---------- 動きを減らす設定では、動きを止めて色の変化だけ残す ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .work-card, a, .cta-bar a { transition: none; }
  .btn:hover, .work-card:hover { transform: none; box-shadow: none; }
  .btn:active, .cta-bar a:active { transform: none; }
}

/* ================= IF-STD v1 =================
   インタラクション・フィードバック標準（templates/motion-parts.md）準拠。
   ボタン・カードは上の各規則で「浮く／沈む＋影・色」を実装し、本文リンクは色・下線のみ。
   時間0.2秒（カード0.25秒）・イージング cubic-bezier(.25,.7,.3,1)・:active と :focus-visible 必須。
   reduced-motion では末尾のメディアクエリで動きを止め、色の変化だけを即時に効かせる。 */
