/* 018 そらいろ歯科クリニック ― 色はここだけ触れば差し替わる */
:root {
  --c-bg: #f5f9fc;
  --c-tint: #eef4fb;
  --c-navy: #0f2c4c;
  --c-blue: #3b82f6;
  --c-accent-text: #1d4ed8;
  --c-cloud1: #bfdbfe;
  --c-cloud2: #a5f3fc;
  --c-cloud3: #c7d2fe;
  --c-line: #d7e3f0;
  --c-text: #374151;
  --c-sub: #4b5563;
  --font: "Zen Kaku Gothic New", sans-serif;
  --font-en: "Outfit", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.95; color: var(--c-text); background: var(--c-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; }
/* グリッドの中身が、表や写真の元の幅で列を押し広げないように */
[class*="__inner"] > * { min-width: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.en { font-family: var(--font-en); font-weight: 600; font-size: 15px; letter-spacing: .2em; color: var(--c-accent-text); margin-bottom: 8px; }
.en--light { color: #bfdbfe; }
.h2 { font-weight: 700; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.5; color: var(--c-navy); margin-bottom: 32px; }
.h2--light { color: #fff; }
.note { margin-top: 16px; font-size: 15px; color: var(--c-sub); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; border: 2px solid transparent; transition: background-color .3s, color .3s; }
.btn--blue { background: var(--c-accent-text); color: #fff; }
.btn--blue:hover { background: var(--c-navy); }
.btn--ghost { background: #fff; color: var(--c-navy); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-accent-text); }
.btn--white { background: #fff; color: var(--c-navy); }
.btn--white:hover { background: var(--c-cloud1); }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }

/* ヘッダー */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.header__inner { display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 12px 0 20px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); }
.logo { display: flex; align-items: center; gap: 8px; min-height: 48px; text-decoration: none; color: var(--c-navy); white-space: nowrap; flex: none; }
.logo__mark { width: 30px; height: 30px; flex: none; }
.logo span { font-weight: 700; font-size: 19px; line-height: 1.2; }
.logo small { font-size: 15px; margin-left: 4px; color: var(--c-sub); }
.gnav { display: none; }
.header__btn { margin-left: auto; min-height: 44px; font-size: 15px; padding: 0 16px; }
@media (max-width: 399px) { .logo small { display: none; } }
@media (min-width: 1080px) {
  .header__inner { height: 76px; padding: 0 40px; }
  .gnav { display: flex; gap: 28px; margin-left: auto; }
  .gnav a { display: flex; align-items: center; min-height: 44px; font-weight: 500; font-size: 15px; text-decoration: none; color: var(--c-navy); }
  .gnav a:hover { color: var(--c-accent-text); }
  .header__btn { margin-left: 0; }
}
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; color: var(--c-navy); }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -7px; } .spmenu__bar::after { top: 7px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; padding: 8px 20px 20px; display: flex; flex-direction: column; box-shadow: 0 16px 32px rgba(15, 44, 76, .12); }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; font-weight: 700; color: var(--c-navy); text-decoration: none; border-bottom: 1px solid var(--c-line); }
@media (min-width: 1080px) { .spmenu { display: none; } }

/* ===== 演出①（D03）：ぼかした色の雲 ===== */
.hero { position: relative; padding: 104px 0 72px; overflow: hidden; }
.clouds { position: absolute; inset: 0; z-index: 0; filter: blur(60px); opacity: .75; pointer-events: none; }
.cloud { position: absolute; display: block; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
.cloud--1 { width: 70vw; height: 60vw; max-width: 760px; max-height: 640px; background: var(--c-cloud1); left: -18vw; top: -10vw; animation: morph1 22s ease-in-out infinite alternate; }
.cloud--2 { width: 55vw; height: 50vw; max-width: 620px; max-height: 560px; background: var(--c-cloud2); right: -14vw; top: 10%; animation: morph2 26s ease-in-out infinite alternate; }
.cloud--3 { width: 60vw; height: 46vw; max-width: 680px; max-height: 520px; background: var(--c-cloud3); left: 24%; bottom: -16vw; animation: morph3 30s ease-in-out infinite alternate; }
@keyframes morph1 { to { border-radius: 61% 39% 42% 58% / 56% 61% 39% 44%; transform: translate(12vw, 6vw) scale(1.1); } }
@keyframes morph2 { to { border-radius: 38% 62% 51% 49% / 62% 38% 62% 38%; transform: translate(-10vw, 8vw) scale(.9); } }
@keyframes morph3 { to { border-radius: 55% 45% 35% 65% / 45% 60% 40% 55%; transform: translate(-8vw, -6vw) scale(1.15); } }
.hero__inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 20px; display: grid; gap: 32px; }
.hero__en { font-family: var(--font-en); font-weight: 600; font-size: 15px; letter-spacing: .24em; color: var(--c-accent-text); }
.hero__title { font-weight: 700; font-size: clamp(38px, 5.6vw, 72px); line-height: 1.35; color: var(--c-navy); margin: 12px 0 20px; }
.hero__lead { font-size: clamp(16px, 1.4vw, 18px); color: var(--c-text); }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__photo { border-radius: 32px; overflow: hidden; box-shadow: 0 30px 60px rgba(15, 44, 76, .14); }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero__hours { background: rgba(255, 255, 255, .92); border-radius: 20px; padding: 18px 22px; box-shadow: 0 12px 30px rgba(15, 44, 76, .08); }
.hero__hours-title { font-weight: 700; color: var(--c-navy); }
.hero__hours p:last-child { font-size: 15px; }
@media (min-width: 1080px) {
  .hero { padding: 150px 0 110px; min-height: 100vh; }
  .hero__inner { padding: 0 48px; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 56px; }
  .hero__hours { grid-column: 1; grid-row: 2; justify-self: start; margin-top: -24px; }
  .hero__text { grid-row: 1; } .hero__photo { grid-row: 1 / span 2; }
  .hero__photo img { aspect-ratio: 5 / 4; }
}

/* ===== 大切にしていること ===== */
.policy { padding: 112px 0; background: #fff; }
.policy__list { display: grid; gap: 20px; }
.policy__list li { background: var(--c-bg); border-radius: 24px; padding: 28px 24px; }
.policy__list svg { width: 48px; height: 48px; }
.policy__list h3 { font-weight: 700; font-size: 19px; color: var(--c-navy); margin: 12px 0 8px; }
@media (min-width: 900px) { .policy { padding: 140px 0; } .policy__list { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

/* ===== 演出②（G02）：ビフォー・アフター ===== */
.compare { padding: 112px 0; background: var(--c-tint); }
.compare__inner { display: grid; gap: 40px; }
.ba { position: relative; border-radius: 24px; overflow: hidden; touch-action: pan-y; user-select: none; box-shadow: 0 24px 50px rgba(15, 44, 76, .12); background: #dbeafe; }
.ba__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__img--before { height: 100%; filter: sepia(.65) saturate(1.7) hue-rotate(-12deg) brightness(.88) contrast(.95); }
.ba__label { position: absolute; top: 14px; padding: 4px 12px; border-radius: 999px; background: rgba(15, 44, 76, .82); color: #fff; font-size: 15px; font-weight: 700; pointer-events: none; }
.ba__label--l { left: 14px; }
.ba__label--r { right: 14px; }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(15, 44, 76, .2); pointer-events: none; }
.ba__knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--c-accent-text); font-size: 15px; letter-spacing: -.1em; box-shadow: 0 6px 16px rgba(15, 44, 76, .25); white-space: nowrap; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
/* つまみと溝は見えなくし、見た目は .ba__line と .ba__knob に任せる（opacity:0 にしない＝押せる・読み上げられる） */
.ba__range::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.ba__range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 56px; height: 100%; background: transparent; border: 0; }
.ba__range::-moz-range-track { height: 100%; background: transparent; }
.ba__range::-moz-range-thumb { width: 56px; height: 100%; background: transparent; border: 0; }
.ba__range:focus { outline: none; }
.ba:focus-within { outline: 3px solid var(--c-accent-text); outline-offset: 4px; }
.ba__facts { margin-top: 20px; background: #fff; border-radius: 16px; padding: 8px 20px; }
.ba__facts div { display: grid; gap: 0; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.ba__facts div:last-child { border-bottom: 0; }
.ba__facts dt { font-weight: 700; color: var(--c-navy); font-size: 15px; }
.ba__facts dd { font-size: 15px; }
@media (min-width: 900px) { .compare { padding: 150px 0; } .compare__inner { grid-template-columns: .8fr 1.2fr; align-items: center; gap: 64px; } .ba__facts div { grid-template-columns: 7em 1fr; gap: 12px; } }

/* ===== 演出③（B06）：付箋のタブのように積み重なる流れ ===== */
.flow { padding: 112px 0 140px; background: #fff; }
.tabs { display: block; }
.tab { position: sticky; top: calc(76px + var(--i) * 46px); margin-bottom: 32px; }
.tab__tag { position: relative; display: flex; align-items: center; gap: 8px; width: max-content; max-width: 62%; margin-left: calc(var(--i) * 9%); height: 46px; padding: 0 16px; border-radius: 14px 14px 0 0; background: var(--c-navy); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.tab:nth-child(even) .tab__tag { background: var(--c-accent-text); }
.tab__tag span { font-family: var(--font-en); font-size: 17px; color: var(--c-cloud1); }
.tab__body { display: grid; gap: 20px; background: var(--c-bg); border: 2px solid var(--c-navy); border-radius: 0 20px 20px 20px; padding: 24px 20px; min-height: 240px; box-shadow: 0 -10px 30px rgba(15, 44, 76, .06); }
.tab:nth-child(even) .tab__body { border-color: var(--c-accent-text); background: #f8fbff; }
.tab__body h3 { font-weight: 700; font-size: clamp(20px, 2.4vw, 28px); color: var(--c-navy); margin-bottom: 8px; }
.tab__body figure { border-radius: 14px; overflow: hidden; }
.tab__body figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 767px) { .tab__tag { margin-left: calc(var(--i) * 6%); } }
@media (min-width: 900px) {
  .flow { padding: 150px 0 200px; }
  .tab { top: calc(100px + var(--i) * 50px); margin-bottom: 22vh; }
  .tab:last-child { margin-bottom: 0; }
  .tab__tag { height: 50px; padding: 0 24px; font-size: 17px; margin-left: calc(var(--i) * 17%); }
  .tab__body { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding: 40px 48px; min-height: 46vh; }
  .tab__body > div:only-child { grid-column: 1 / -1; max-width: 40em; }
}

/* ===== 診療案内 ===== */
.service { padding: 112px 0; }
.service__list { display: grid; gap: 16px; }
.service__list li { background: #fff; border-left: 4px solid var(--c-blue); border-radius: 0 16px 16px 0; padding: 22px 24px; }
.service__list h3 { font-weight: 700; font-size: 19px; color: var(--c-navy); margin-bottom: 4px; }
@media (min-width: 900px) { .service { padding: 140px 0; } .service__list { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ===== 診療時間・アクセス ===== */
.hours { background: var(--c-navy); color: #e2e8f0; padding: 112px 0; }
.hours__inner { display: grid; gap: 48px; }
.table-scroll { overflow-x: auto; }
.hours__table { width: 100%; min-width: 360px; border-collapse: collapse; font-size: 15px; }
.hours__table th, .hours__table td { padding: 12px 6px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.hours__table thead th { color: #bfdbfe; font-weight: 700; }
.hours__table tbody th { color: #fff; font-weight: 500; text-align: left; white-space: nowrap; }
.hours__table td { color: #fff; }
.hours__note { font-size: 15px; margin-top: 12px; }
.hours .info { margin: 28px 0 32px; }
.info div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.info dt { font-weight: 700; color: #fff; }
.info a { color: #fff; }
.hours__photo { border-radius: 24px; overflow: hidden; }
.hours__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) { .hours { padding: 140px 0; } .hours__inner { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; } .info div { grid-template-columns: 4em 1fr; gap: 16px; } }

/* ===== フッター ===== */
.footer { background: #fff; padding: 56px 20px 32px; text-align: center; font-size: 15px; }
.footer__logo { font-weight: 700; font-size: 22px; color: var(--c-navy); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; margin: 12px 0; }
.footer__nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--c-navy); font-weight: 500; }
.footer__fiction { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .cloud { animation: none; }
}
