/* 022 みかんの木こどもクリニック ― 色はここだけ触れば差し替わる */
:root {
  --c-bg: #fff8e7;
  --c-orange: #ff8a1f;
  --c-yellow: #ffd23f;
  --c-cream-y: #ffe08a;
  --c-ink: #2b1d0e;
  --c-accent-text: #b45309;
  --c-text: #374151;
  --c-sub: #4b5563;
  --c-green: #8fd694;
  --c-pink: #ffb3c1;
  --font: "Zen Maru Gothic", sans-serif;
  --font-pop: "Mochiy Pop One", sans-serif;
  --font-hand: "Yusei Magic", sans-serif;
  --center: 440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.9; color: var(--c-text); background: var(--c-bg); padding-bottom: 76px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 3px solid var(--c-ink); border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--c-ink); white-space: nowrap; flex: none; box-shadow: 0 4px 0 var(--c-ink); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--c-ink); }
.btn--orange { background: var(--c-orange); }
.btn--white { background: #fff; }
.btn--lg { min-height: 60px; font-size: 18px; width: 100%; }

.h2 { font-family: var(--font-pop); font-weight: 400; font-size: clamp(26px, 7vw, 32px); line-height: 1.45; color: var(--c-ink); margin-bottom: 28px; }
.h2__sub { display: block; font-family: var(--font); font-weight: 700; font-size: 15px; letter-spacing: .1em; color: var(--c-accent-text); margin-bottom: 4px; }
.note { font-size: 15px; color: var(--c-sub); margin-top: 12px; }

/* 波の縁（F03） */
.wave { position: absolute; left: 0; width: 100%; height: 24px; display: block; color: var(--c-bg); }
.wave path { fill: currentColor; }
.wave--bottom { bottom: -1px; }
.wave--top { top: -1px; }

/* ===== スマホのヘッダー ===== */
.header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 8px 0 16px; background: var(--c-bg); border-bottom: 3px solid var(--c-ink); }
.logo { display: flex; align-items: center; gap: 6px; min-height: 48px; text-decoration: none; white-space: nowrap; flex: none; color: var(--c-ink); }
.logo__mark { width: 36px; height: 36px; flex: none; }
.logo span { font-family: var(--font-pop); font-size: 17px; line-height: 1.15; }
.logo small { display: block; font-family: var(--font); font-weight: 700; font-size: 15px; }
.header__btn { margin-left: auto; min-height: 44px; padding: 0 14px; font-size: 15px; box-shadow: 0 3px 0 var(--c-ink); }

.spmenu { flex: none; color: var(--c-ink); }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; }
.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: 3px; 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: var(--c-bg); padding: 8px 20px 24px; display: flex; flex-direction: column; border-bottom: 3px solid var(--c-ink); }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; text-decoration: none; font-weight: 700; color: var(--c-ink); border-bottom: 2px dashed #f0cf8a; }

/* スマホ：下に固定の予約ボタン */
.spbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px 14px; background: var(--c-yellow); border-top: 3px solid var(--c-ink); }

/* ===== 演出①（B08）：3列の舞台 ===== */
.stage { display: none; }
.center { background: var(--c-bg); min-width: 0; }
@media (min-width: 1080px) {
  body { padding-bottom: 0; }
  html { scroll-padding-top: 0; }
  .header, .spbar { display: none; }
  .layout { display: grid; grid-template-columns: 1fr minmax(0, var(--center)) 1fr; }
  .stage { display: block; position: sticky; top: 0; height: 100vh; align-self: start; overflow: hidden; }
  .stage--left { background: radial-gradient(circle, rgba(255, 255, 255, .28) 2.5px, transparent 3px) 0 0 / 30px 30px, var(--c-orange); }
  .stage--right { background: radial-gradient(circle, rgba(255, 138, 31, .3) 2.5px, transparent 3px) 0 0 / 30px 30px, var(--c-yellow); }
  /* 舞台の飾り：大きな丸 */
  .stage::before { content: ""; position: absolute; width: 46vh; height: 46vh; border-radius: 50%; border: 3px solid var(--c-ink); opacity: .14; pointer-events: none; }
  .stage--left::before { left: -16vh; bottom: -14vh; background: var(--c-yellow); opacity: .5; border: 0; }
  .stage--right::before { right: -18vh; top: -16vh; background: #fff; opacity: .55; border: 0; }
  .stage__inner { position: relative; z-index: 1; }
  /* 中央との境目は、ぽこぽこの縁 */
  .stage::after { content: ""; position: absolute; top: 0; bottom: 0; width: 16px; background: radial-gradient(circle at var(--edge) 50%, var(--c-bg) 10px, transparent 10.5px) 0 0 / 16px 28px repeat-y; }
  .stage--left::after { right: 0; --edge: 100%; }
  .stage--right::after { left: 0; --edge: 0%; }
  .stage__inner { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 40px clamp(24px, 4vw, 72px); }
  .stage--left .stage__inner { align-items: flex-end; text-align: right; }
  .stage--right .stage__inner { align-items: flex-start; max-width: 380px; }
  .center { border-left: 3px solid var(--c-ink); border-right: 3px solid var(--c-ink); }
}
.stage__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink); white-space: nowrap; }
.stage__logo svg { width: 64px; height: 64px; flex: none; background: var(--c-bg); border: 3px solid var(--c-ink); border-radius: 50%; padding: 4px; }
.stage__logo span { font-family: var(--font-pop); font-size: clamp(20px, 1.8vw, 28px); line-height: 1.2; text-align: left; }
.stage__logo small { display: block; font-family: var(--font); font-weight: 700; font-size: 16px; }
.stage__bear { width: clamp(110px, 10vw, 170px); filter: drop-shadow(0 6px 0 rgba(43, 29, 14, .25)); }
.stage__nav { display: flex; flex-direction: column; gap: 2px; }
.stage__nav a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 700; font-size: 17px; color: var(--c-ink); }
.stage__nav a::after { content: ""; width: 14px; height: 14px; border: 3px solid var(--c-ink); border-radius: 50%; background: transparent; transition: background-color .3s, transform .3s; }
.stage__nav a.is-current::after, .stage__nav a:hover::after { background: var(--c-yellow); transform: scale(1.3); }
.today { width: 100%; background: #fff; border: 3px solid var(--c-ink); border-radius: 24px; padding: 20px 24px; box-shadow: 0 6px 0 var(--c-ink); }
.today__label { font-weight: 700; color: var(--c-accent-text); }
.today__time { font-family: var(--font-pop); font-size: 24px; line-height: 1.4; color: var(--c-ink); margin: 4px 0; }
.today__note, .stage__memo { font-size: 15px; color: var(--c-ink); }

/* ===== メインビジュアル ===== */
.hero__photo { position: relative; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.hero__text { padding: 12px 20px 56px; }
.hero__label { display: inline-block; padding: 2px 14px; background: var(--c-yellow); border: 2px solid var(--c-ink); border-radius: 999px; font-weight: 700; color: var(--c-ink); font-size: 15px; transform: rotate(-2deg); }
.hero__title { font-family: var(--font-pop); font-weight: 400; font-size: clamp(38px, 11vw, 46px); line-height: 1.3; color: var(--c-ink); margin: 16px 0; }
.hero__title span { color: var(--c-accent-text); }

/* ===== 演出②（E06）：院長からのおてがみ ===== */
.first { padding: 40px 20px 72px; }
.letter { position: relative; padding: 24px 20px; background: #fff repeating-linear-gradient(transparent 0 43px, #f3dca7 43px 44px); background-position: 0 24px; border: 3px solid var(--c-ink); border-radius: 20px; }
.letter__line { font-family: var(--font-hand); font-size: 19px; line-height: 44px; color: var(--c-ink); white-space: nowrap; width: fit-content; }
.letter mark { color: inherit; background: linear-gradient(transparent 52%, var(--c-yellow) 52%, var(--c-yellow) 92%, transparent 92%) no-repeat 0 0 / 100% 100%; }
.pen { display: none; }
.is-motion .pen { display: block; position: absolute; top: 0; left: 0; width: 36px; height: 36px; pointer-events: none; }

/* ===== 診療時間（ちぎれ紙のカード） ===== */
.hours { padding: 0 20px 72px; }
.paper { background: #fff; padding: 40px 18px 36px; filter: drop-shadow(0 4px 0 rgba(43, 29, 14, .18)); clip-path: polygon(0% 3px, 6.2% 9px, 12.5% 8px, 18.8% 2px, 25% 5px, 31.2% 9px, 37.5% 7px, 43.8% 9px, 50% 1px, 56.2% 9px, 62.5% 0px, 68.8% 7px, 75% 4px, 81.2% 8px, 87.5% 3px, 93.8% 3px, 100% 7px, 100% calc(100% - 8px), 93.8% calc(100% - 8px), 87.5% calc(100% - 7px), 81.2% calc(100% - 6px), 75% calc(100% - 2px), 68.8% calc(100% - 3px), 62.5% calc(100% - 2px), 56.2% calc(100% - 8px), 50% calc(100% - 6px), 43.8% 100%, 37.5% calc(100% - 1px), 31.2% calc(100% - 2px), 25% calc(100% - 9px), 18.8% 100%, 12.5% calc(100% - 4px), 6.2% 100%, 0% calc(100% - 4px)); }
.table { width: 100%; border-collapse: collapse; text-align: center; font-size: 15px; }
.table th, .table td { padding: 10px 2px; border-bottom: 2px dashed #f0cf8a; font-weight: 700; }
.table thead th { color: var(--c-ink); }
.table th[scope="row"] { text-align: left; line-height: 1.4; color: var(--c-ink); }
.table td { color: var(--c-accent-text); font-size: 18px; }
.table td.table__wide { font-size: 15px; color: var(--c-ink); }

/* ===== 診療内容 ===== */
.medical { padding: 0 20px 96px; }
.menu { display: grid; gap: 14px; }
.menu__item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; background: #fff; border: 3px solid var(--c-ink); border-radius: 20px; padding: 14px 16px; }
.menu__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--c-ink); }
.menu__icon svg { width: 36px; height: 36px; }
.menu__icon--o { background: var(--c-orange); }
.menu__icon--y { background: var(--c-yellow); }
.menu__icon--g { background: var(--c-green); }
.menu__icon--p { background: var(--c-pink); }
.menu__item h3 { font-family: var(--font-pop); font-weight: 400; font-size: 19px; color: var(--c-ink); line-height: 1.4; }
.menu__item p { font-size: 15px; }

/* ===== 熱があるとき（波の縁で区切る） ===== */
.fever { position: relative; background: var(--c-cream-y); padding: 72px 20px 88px; }
.fever .h2__sub { color: var(--c-ink); }
.fever__photo { border: 3px solid var(--c-ink); border-radius: 24px; overflow: hidden; margin-bottom: 24px; }
.fever__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.steps { display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; color: var(--c-ink); }
.steps span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 3px solid var(--c-ink); font-family: var(--font-pop); }

/* ===== こわくない工夫 ===== */
.ideas { position: relative; padding: 64px 20px 88px; overflow-x: clip; }
.ideas__kid { position: absolute; top: -118px; right: 12px; width: 92px; z-index: 2; }
.idea + .idea { margin-top: 40px; }
.idea__photo { overflow: hidden; border: 3px solid var(--c-ink); margin-bottom: 16px; }
.idea__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.idea__photo--a { border-radius: 58% 42% 48% 52% / 46% 52% 48% 54%; }
.idea__photo--b { border-radius: 42% 58% 55% 45% / 55% 44% 56% 45%; }
.idea h3 { font-family: var(--font-pop); font-weight: 400; font-size: 21px; color: var(--c-ink); }

/* ===== アクセス ===== */
.access { padding: 0 20px 80px; }
.access__photo { border: 3px solid var(--c-ink); border-radius: 24px; overflow: hidden; margin-bottom: 20px; }
.access__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.info div { padding: 12px 0; border-bottom: 2px dashed #f0cf8a; }
.info dt { font-weight: 700; color: var(--c-ink); }

/* ===== フッター ===== */
.footer { position: relative; background: var(--c-ink); color: #fff8e7; padding: 56px 20px 40px; text-align: center; font-size: 15px; }
.footer__logo { font-family: var(--font-pop); font-size: 20px; color: #fff; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin: 16px 0; }
.footer__nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer__fiction { margin-top: 20px; }

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