/* =====================================================================
   治療院サイト「studio」テンプレ
   写真主役 / ホテルライク / 美容整体・自費治療向け
   ===================================================================== */

:root {
  --c-primary: #24343a;
  --c-primary-hover: #172126;
  --c-accent: #c58f53;
  --c-accent-hover: #a36f38;
  --c-ink: #172126;
  --c-body: #334247;
  --c-muted: #6c7779;
  --c-line: #ded6ca;
  --c-bg: #f7f3ec;
  --c-bg-muted: #eee7dc;
  --c-panel: #fffdfa;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(23, 33, 38, 0.08);
  --shadow-md: 0 18px 50px rgba(23, 33, 38, 0.13);
  --fs-hero: clamp(2rem, 7vw, 4.2rem);
  --fs-h2: clamp(1.45rem, 3.5vw, 2.25rem);
  --fs-h3: 1.08rem;
  --ff: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
        "Hiragino Sans", "Yu Gothic Medium", "Meiryo", system-ui, sans-serif;
  --ff-serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho",
              "YuMincho", "Noto Serif JP", "Times New Roman", serif;
  /* Hero 軽量化トークン (2026-05-08): 黒オーバーレイ廃止 + 写真主役。
     白文字を維持するため bottom 側だけ palette 色で fade、top は素の写真。 */
  --hero-overlay-warm: linear-gradient(180deg,
    rgba(75, 52, 40, 0.0) 0%,
    rgba(75, 52, 40, 0.18) 35%,
    rgba(75, 52, 40, 0.55) 100%);
  --hero-overlay-cool: linear-gradient(180deg,
    rgba(15, 23, 42, 0.0) 0%,
    rgba(15, 23, 42, 0.20) 35%,
    rgba(15, 23, 42, 0.58) 100%);
  --hero-overlay-soft: linear-gradient(180deg,
    rgba(31, 41, 55, 0.0) 0%,
    rgba(31, 41, 55, 0.18) 35%,
    rgba(31, 41, 55, 0.52) 100%);
  --hero-photo-filter: saturate(1.0) contrast(1.02);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-body);
  background: var(--c-bg);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent); text-decoration: underline; }
h1, h2, h3 { color: var(--c-ink); line-height: 1.35; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: rgba(255, 253, 250, 0.9);
  border-bottom: 1px solid rgba(222, 214, 202, 0.85);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
}
.site-title {
  font-family: var(--ff-serif);
  font-size: 1rem;
  margin: 0;
  color: var(--c-ink);
  font-weight: 700;
}
.site-nav {
  display: none;
  align-items: center;
  gap: 18px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-nav a { color: var(--c-muted); }
.site-nav a:hover { color: var(--c-primary); text-decoration: none; }
.site-header .tel {
  border: 1px solid var(--c-line);
  border-radius: 999px;
  color: var(--c-primary);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 12px;
  white-space: nowrap;
  background: #fff;
}
.site-header .tel::before { content: "Tel "; color: var(--c-accent); }
.site-header .tel:hover { text-decoration: none; border-color: var(--c-accent); }

.hero {
  min-height: min(760px, calc(100svh - 68px));
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 96px 0 56px;
  /* 写真なし時の fallback bg。写真ありの場合は .has-photo で上書き */
  background: var(--c-primary);
  color: #ffffff;
}
.hero::before {
  /* 旧: rgba(23,33,38,0.8) の濃い黒帯。文字読み取りは has-photo::after に集約 */
  display: none;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: var(--hero-photo-filter);
}
.hero.has-photo {
  background: var(--c-primary);
}
.hero.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* 旧: 横方向 0.78〜0.88 の濃いオーバーレイ → palette warm/cool で bottom-fade */
  background: var(--hero-overlay-warm);
}
.hero .container {
  max-width: 1120px;
}
.hero-kicker {
  color: var(--c-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.hero-title {
  color: #fffdfa;
  font-family: var(--ff-serif);
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: 0;
  max-width: 820px;
  margin-bottom: 18px;
}
.hero-sub {
  color: rgba(255, 253, 250, 0.86);
  max-width: 620px;
  font-size: 0.98rem;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
  max-width: 360px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.94rem;
  text-decoration: none;
  transition: transform 0.12s ease-out, background 0.18s ease-out, border-color 0.18s ease-out;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-accent); color: var(--c-accent-ink, #172126); font-weight: 800; }
.btn-primary:hover { background: #d6a870; color: var(--c-accent-ink, #172126); }
.btn-secondary {
  background: rgba(255, 253, 250, 0.08);
  color: #fffdfa;
  border: 1px solid rgba(255, 253, 250, 0.55);
}
.btn-secondary:hover { background: rgba(255, 253, 250, 0.16); color: #fffdfa; border-color: #fffdfa; }
.btn-link {
  display: inline-flex;
  align-items: center;
  color: var(--c-primary);
  font-weight: 800;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-accent);
}

section {
  padding: 72px 0;
  background: var(--c-bg);
}
section:nth-of-type(even) { background: var(--c-panel); }
section h2 {
  font-family: var(--ff-serif);
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 1.1em;
}
section h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--c-accent);
  margin-bottom: 16px;
}

.info-list {
  background: var(--c-panel);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 8px 22px;
  margin: 0;
}
.info-list > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--c-line);
}
.info-list > div:last-child { border-bottom: 0; }
.info-list dt {
  color: var(--c-accent-hover);
  font-size: 0.78rem;
  font-weight: 800;
}
.info-list dd { margin: 0; color: var(--c-ink); }
.info-list .hours-row { display: flex; justify-content: space-between; gap: 12px; }
.info-list .hours-row + .hours-row { margin-top: 4px; }
.info-list .hours-label { color: var(--c-muted); min-width: 3em; }

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  display: grid;
  gap: 18px;
}
.menu-card {
  background: var(--c-panel);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.menu-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.menu-card .body { padding: 20px; }
.menu-card h3 {
  font-family: var(--ff-serif);
  font-size: var(--fs-h3);
  font-weight: 700;
  margin-bottom: 8px;
}
.menu-card .price {
  color: var(--c-accent-hover);
  font-weight: 800;
  margin-bottom: 8px;
}
.menu-card .desc {
  color: var(--c-muted);
  font-size: 0.92rem;
  line-height: 1.72;
  margin: 0;
}

.profile-card {
  background: var(--c-panel);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.profile-portrait {
  width: 132px;
  height: 132px;
  border-radius: 999px;
  object-fit: cover;
  margin: 0 0 18px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--c-line), var(--shadow-sm);
}
.profile-card .name {
  color: var(--c-ink);
  font-family: var(--ff-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.profile-card .qualifications {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.profile-card .qualifications li {
  border: 1px solid var(--c-line);
  border-radius: 999px;
  color: var(--c-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 11px;
  background: #faf6ef;
}
.profile-card .career {
  color: var(--c-muted);
  border-top: 1px solid var(--c-line);
  padding-top: 18px;
}
.profile-card .message { color: var(--c-body); margin-bottom: 0; }

.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.links-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: var(--c-panel);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  color: var(--c-primary);
  font-weight: 800;
}
.links-list a::after { content: "Open"; color: var(--c-accent-hover); font-size: 0.78rem; }
.links-list a:hover { text-decoration: none; border-color: var(--c-accent); }

.photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.photos-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.photos-grid img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.notice-box {
  background: var(--c-primary);
  color: #fffdfa;
  border-radius: var(--radius);
  padding: 24px;
}
.notice-box .label {
  color: var(--c-accent);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.notice-box p { margin: 0; white-space: pre-wrap; }

.site-footer {
  background: var(--c-primary);
  color: rgba(255, 253, 250, 0.78);
  padding: 48px 0 36px;
  font-size: 0.9rem;
}
.site-footer h3 {
  color: #fffdfa;
  font-family: var(--ff-serif);
  font-size: 1.18rem;
  margin-bottom: 0.7em;
}
.site-footer .tel { color: var(--c-accent); font-weight: 800; }
.site-footer .copy {
  margin-top: 24px;
  color: rgba(255, 253, 250, 0.45);
  font-size: 0.78rem;
}

.menu-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px;
}
.menu-detail {
  background: var(--c-panel);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu-detail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.menu-detail .body { padding: 24px; }
.menu-detail h3 {
  font-family: var(--ff-serif);
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.menu-detail .meta {
  color: var(--c-accent-hover);
  font-weight: 800;
  margin-bottom: 12px;
}
.menu-detail .desc { margin: 0; }
.back-home {
  display: inline-block;
  margin: 30px 0 0;
  color: var(--c-muted);
  font-weight: 700;
}

@media (min-width: 720px) {
  .site-nav { display: flex; }
  .hero { padding: 120px 0 72px; }
  .hero-cta { flex-direction: row; max-width: none; }
  .btn { min-width: 210px; }
  section { padding: 88px 0; }
  .menu-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    column-gap: 30px;
    align-items: start;
  }
  .profile-card .name,
  .profile-card .qualifications,
  .profile-card .career,
  .profile-card .message { grid-column: 2; }
  .profile-portrait { grid-row: 1 / span 4; margin: 0; width: 160px; height: 160px; }
  .photos-grid { grid-template-columns: repeat(4, 1fr); }
  .photos-grid img:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
  .info-list > div { grid-template-columns: 140px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* conversion-focused clinic sections */
.hero { position: relative; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: var(--hero-photo-filter); }
.hero.has-photo::before { /* 横帯の暗オーバーレイは has-photo::after の縦 fade に集約 */ display: none; }
.hero-kicker { color: var(--c-accent); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.12em; margin: 0 0 14px; }
.hero-tags { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-tags li { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border: 1px solid rgba(255,255,255,0.5); border-radius: 999px; color: #fff; background: rgba(255,255,255,0.12); font-size: 0.82rem; }
.cta-panel { display: grid; gap: 20px; align-items: center; background: var(--c-primary); color: #fff; border-radius: var(--radius); padding: 28px; }
.cta-panel h2 { color: #fff; text-align: left; margin-bottom: 0.4em; }
.cta-panel h2::before, .cta-panel h2::after { display: none; }
.cta-panel p { color: rgba(255,255,255,0.82); margin: 0; }
.cta-actions { display: flex; flex-direction: column; gap: 10px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { background: var(--c-panel, #fff); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 16px; color: var(--c-ink); }
.check-list li::before { content: "✓"; color: var(--c-accent); font-weight: 800; margin-right: 8px; }
.reason-grid, .voice-grid { display: grid; gap: 14px; }
.reason-card, .voice-card { background: var(--c-panel, #fff); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.reason-num { color: var(--c-accent); font-weight: 900; font-size: 0.82rem; margin-bottom: 8px; }
.reason-card p, .voice-card p { margin: 0; }
.lead-text { max-width: 760px; color: var(--c-body); }
.compare-table { display: grid; gap: 12px; margin-top: 18px; }
.compare-table > div { background: var(--c-panel, #fff); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; }
.compare-table h3, .voice-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--c-ink); }
.flow-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: step; }
.flow-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--c-panel, #fff); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 16px; }
.flow-list span { color: var(--c-accent); font-weight: 900; min-width: 2.4em; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { background: var(--c-panel, #fff); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 16px; }
.faq-list summary { cursor: pointer; font-weight: 800; color: var(--c-ink); }
.faq-list p { margin: 10px 0 0; color: var(--c-body); }
.note-text { margin-top: 12px; font-size: 0.78rem; color: var(--c-muted); }
.center-link { text-align: center; margin-top: 18px; }
@media (min-width: 720px) {
  .hero-tags { justify-content: flex-start; }
  .cta-panel { grid-template-columns: 1fr auto; }
  .cta-actions { min-width: 260px; }
  .reason-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .voice-grid, .compare-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* fixed-cta — 旧版は dark 背景の中に白ピルを入れる「二重ボタン」構造で
   ヒーロー CTA と視覚的にぶつかっていた。背景を透明にして、各ピルを
   独立した塗り CTA に変更。primary-ink で文字色を自動最適化する。
   iOS Safari のホームインジケータ / 下部 UI に隠されないよう
   safe-area-inset-bottom を加味した位置取りにする。 */
.fixed-cta {
  position: fixed; left: 12px; right: 12px; z-index: 9999;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-auto-flow: column; gap: 10px;
  padding: 0; background: transparent; border-radius: 0; box-shadow: none;
  pointer-events: none;
}
.fixed-cta a {
  pointer-events: auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px 14px;
  border-radius: 999px;
  background: var(--c-primary); color: var(--c-primary-ink, #fff);
  font-weight: 800; font-size: 0.92rem; text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(8px);
}
.fixed-cta a:hover { color: var(--c-primary-ink, #fff); text-decoration: none; }
/* 固定 CTA (56px) + 下マージン (12px) + iOS 下部 UI を確保 */
body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 960px) { .fixed-cta { display: none; } body { padding-bottom: 0; } }

/* ====== Phase 3a: 口コミ依頼 + 固定 CTA ============================== */
.section-reviews-cta { padding: 56px 0; background: var(--c-bg-muted, #f8fafc); }
.reviews-cta {
  max-width: 560px;
  margin: 0 auto;
  background: var(--c-bg, #fff);
  border: 1px solid var(--c-line, #e2e8f0);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.reviews-cta h2 {
  font-size: 1.25rem;
  margin: 0 0 .6em;
  color: var(--c-ink, #0f172a);
}
.reviews-cta__message {
  color: var(--c-muted, #475569);
  margin: 0 0 1.4em;
  line-height: 1.75;
  font-size: 0.95rem;
}
.reviews-cta__button {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--c-primary, #0369a1);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background .15s, transform .15s;
}
.reviews-cta__button:hover { background: var(--c-primary-hover, #075985); transform: translateY(-1px); }
.reviews-cta__thanks {
  margin: 1.2em 0 0;
  font-size: .85rem;
  color: var(--c-muted, #64748b);
}

/* 固定 CTA バー */
.floating-cta {
  display: none; /* デスクトップでは非表示。モバイルだけ常時表示 */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 8px;
  /* iOS Safari の home indicator に隠されないよう safe-area を加算 */
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  border-top: 1px solid var(--c-line, #e2e8f0);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .12);
}
@media (max-width: 720px) {
  .floating-cta { display: flex; }
  body { padding-bottom: 72px; } /* 固定 CTA 分のスペース確保 */
}
.floating-cta__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 4px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: filter .15s;
}
.floating-cta__btn:hover { filter: brightness(1.06); }
/* colored: テンプレのプライマリ色 */
.floating-cta--colored .floating-cta__btn--phone { background: var(--c-primary, #0369a1); color: #fff; }
.floating-cta--colored .floating-cta__btn--line  { background: #06c755; color: #fff; }
.floating-cta--colored .floating-cta__btn--reservation { background: var(--c-accent, #0ea5e9); color: #fff; }
/* simple: 控えめ */
.floating-cta--simple .floating-cta__btn { background: var(--c-bg, #fff); color: var(--c-primary, #0369a1); border: 1px solid var(--c-line, #e2e8f0); }
.floating-cta--simple .floating-cta__btn--line { color: #06c755; }
