/*
 * 池尾小児歯科「鹿さんと歩く、歯の森」
 * 既存の医療情報を変えず、物語性・奥行き・遊びを加える体験レイヤー。
 */

:root {
  --forest: #1c4b42;
  --forest-deep: #102f2c;
  --forest-soft: #356f5f;
  --sky: #d9edf0;
  --sun: #f2a34e;
  --sun-soft: #f9d59d;
  --berry: #d96f5d;
  --paper: #fffaf0;
  --paper-deep: #f2e6cf;
  --trail: #d9c59f;
  --immersive-shadow: 0 30px 80px #163b351c;
}

/* CONTACTの章札を通常フローへ戻し、ズームや文字拡大でも見出しと重ねない */
.contact-band > p.chapter-label {
  position: relative;
  top: auto;
  left: auto;
  width: max-content;
  margin: 0 auto 30px;
  font: 800 9px/1.4 Arial, var(--font-rounded);
  letter-spacing: .16em;
  transform: none;
}

.contact-band .kicker {
  margin-top: 0;
}

/* 5頭発見：花火よりもこのサイトらしい、木の葉と光の祝祭 */
.forest-finale {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  animation: forest-finale-lifetime 4.8s both;
}

.forest-finale::before,
.forest-finale::after,
.forest-finale-glow {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.forest-finale::before {
  z-index: -3;
  inset: -35%;
  background:
    radial-gradient(circle at center, #fff8dcf2 0 8%, #f6cf83bf 18%, #4f9673b8 39%, #143e37c9 63%, transparent 72%);
  animation: forest-finale-canopy 3.7s cubic-bezier(.16, .75, .25, 1) both;
}

.forest-finale::after {
  z-index: -2;
  width: min(118vw, 1180px);
  aspect-ratio: 1;
  border: 2px solid #fff7d7a3;
  box-shadow:
    0 0 0 22px #f5bf6824,
    0 0 0 58px #ffffff18,
    0 0 0 112px #a8c97a20;
  animation: forest-finale-rings 2.8s .08s ease-out both;
}

.forest-finale-glow {
  z-index: -1;
  width: min(72vw, 640px);
  aspect-ratio: 1;
  background: repeating-conic-gradient(from 8deg, #fff0 0 9deg, #fff8d83d 10deg 12deg, #fff0 13deg 22deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 26%, #000 45%, transparent 73%);
  mask-image: radial-gradient(circle, transparent 0 26%, #000 45%, transparent 73%);
  animation: forest-finale-turn 9s linear infinite;
}

.forest-finale-card {
  position: relative;
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(calc(100% - 40px), 590px);
  min-height: 190px;
  padding: 24px 34px 24px 18px;
  border: 2px solid #fff8dc;
  border-radius: 44px 44px 72px 44px;
  color: #fff;
  background: linear-gradient(135deg, #245d50f5, #102f2cf7);
  box-shadow: 0 34px 100px #071b1975, inset 0 0 0 7px #ffffff12;
  transform-origin: center;
  animation: forest-finale-card 4.4s .1s cubic-bezier(.2, .8, .2, 1) both;
}

.forest-finale-card::before {
  position: absolute;
  top: 16px;
  right: 20px;
  color: var(--sun-soft);
  content: "✦";
  font-size: 24px;
  animation: forest-finale-twinkle .9s ease-in-out infinite alternate;
}

.forest-finale-deer {
  width: 142px;
  height: 142px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px #071b1945);
  animation: forest-finale-deer 1.15s .25s cubic-bezier(.2, .9, .25, 1.2) both;
}

.forest-finale-copy span,
.forest-finale-copy strong,
.forest-finale-copy small {
  display: block;
}

.forest-finale-copy span {
  margin-bottom: 8px;
  color: #f9d59dcc;
  font: 800 9px/1.4 Arial, sans-serif;
  letter-spacing: .22em;
}

.forest-finale-copy strong {
  font-family: var(--font-mincho);
  font-size: clamp(21px, 3.4vw, 31px);
  font-weight: 600;
  line-height: 1.45;
}

.forest-finale-copy small {
  margin-top: 9px;
  color: #ffffffe0;
  font-size: 11px;
  font-weight: 700;
}

.forest-finale-particle {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  opacity: 0;
  animation: forest-finale-burst 2.35s var(--finale-delay) cubic-bezier(.15, .7, .2, 1) both;
}

.forest-finale-particle.is-leaf {
  width: 13px;
  height: 22px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(145deg, #d4e99b, #6fa77a);
  box-shadow: 0 0 14px #e9ffc2a6;
}

.forest-finale-particle.is-star {
  color: #ffd98a;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 0 16px #fff2b7;
}

.forest-finale-particle.is-light {
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f9d59d;
  box-shadow: 0 0 18px 5px #f9d59d8c;
}

@keyframes forest-finale-lifetime {
  0%, 92% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes forest-finale-canopy {
  0% { opacity: 0; transform: scale(.16) rotate(-8deg); }
  18% { opacity: 1; }
  72% { opacity: .96; }
  100% { opacity: 0; transform: scale(1.18) rotate(6deg); }
}

@keyframes forest-finale-rings {
  0% { opacity: 0; transform: scale(.08); }
  24% { opacity: .9; }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes forest-finale-turn {
  to { transform: rotate(360deg); }
}

@keyframes forest-finale-card {
  0% { opacity: 0; transform: translateY(34px) scale(.7) rotate(-3deg); }
  12% { opacity: 1; transform: translateY(0) scale(1.04) rotate(1deg); }
  18%, 84% { opacity: 1; transform: scale(1) rotate(0); }
  100% { opacity: 0; transform: translateY(-10px) scale(.96); }
}

@keyframes forest-finale-deer {
  0% { opacity: 0; transform: translateY(34px) rotate(-8deg) scale(.72); }
  62% { opacity: 1; transform: translateY(-6px) rotate(4deg) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

@keyframes forest-finale-twinkle {
  to { opacity: .38; transform: rotate(35deg) scale(.72); }
}

@keyframes forest-finale-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(.2); }
  14% { opacity: 1; }
  72% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--finale-x)), calc(-50% + var(--finale-y))) rotate(var(--finale-turn)) scale(1.05); }
}

@media (max-width: 640px) {
  .contact-band > p.chapter-label {
    margin-bottom: 24px;
  }

  .forest-finale-card {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 150px;
    padding: 18px 20px 18px 12px;
    border-radius: 30px 30px 48px 30px;
  }

  .forest-finale-deer {
    width: 96px;
    height: 108px;
  }

  .forest-finale-copy strong {
    font-size: 19px;
  }

  .forest-finale-copy small {
    font-size: 9px;
    line-height: 1.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .forest-finale,
  .forest-finale-card,
  .forest-finale-deer {
    animation: none;
  }

  .forest-finale::before,
  .forest-finale::after,
  .forest-finale-glow,
  .forest-finale-particle {
    display: none;
  }

  .forest-finale {
    background: #102f2cb8;
  }
}

html {
  scroll-padding-top: 118px;
}

body.forest-journey {
  background:
    radial-gradient(circle at 12% 8%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 82% 17%, #fff 0 1.5px, transparent 2.5px),
    var(--paper);
  background-size: 48px 48px, 72px 72px, auto;
}

body.forest-journey::before {
  position: fixed;
  z-index: 150;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  content: "";
  background: #ffffff5c;
}

.page-progress {
  position: fixed;
  z-index: 151;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.page-progress span {
  display: block;
  width: var(--page-progress, 0%);
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, var(--sun), #f4c566, var(--wakakusa));
  box-shadow: 0 0 16px #f2a34e9c;
}

/* 森の入口のように浮かぶヘッダー */
.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  width: min(calc(100% - 34px), 1460px);
  border: 1px solid #ffffffb8;
  border-radius: 24px;
  background: #fffaf0dd;
  box-shadow: 0 14px 45px #173d3717;
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  transform: translateX(-50%);
  transition: top .3s ease, background-color .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
  top: 7px;
  background: #fffaf0f2;
  box-shadow: 0 12px 35px #173d3724;
}

.header-inner {
  min-height: 76px;
}

.official-logo {
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #1c4b4212;
}

.desktop-nav a::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: var(--wakakusa);
  content: "";
  transition: transform .2s ease;
}

.desktop-nav a:hover::before {
  transform: scale(1.8);
}

.header-phone {
  color: #fff;
  border: 0;
  background: var(--forest);
  box-shadow: 0 8px 22px #1c4b4229;
}

.header-phone:hover {
  background: var(--sun);
}

/* デスクトップの物語ナビ */
.journey-map {
  position: fixed;
  z-index: 45;
  top: 50%;
  left: 18px;
  display: grid;
  gap: 5px;
  width: 112px;
  padding: 15px 12px;
  border: 1px solid #ffffff85;
  border-radius: 22px;
  background: #fffaf0d9;
  box-shadow: 0 16px 46px #163b3517;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
}

.journey-map p {
  margin: 0 0 6px;
  color: var(--forest);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}

.journey-map p span {
  color: var(--sun);
}

.journey-map a {
  display: grid;
  grid-template-columns: 21px 1fr;
  align-items: center;
  min-height: 31px;
  color: #1c4b428f;
  border-radius: 10px;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.journey-map a span {
  font: 700 8px/1 Arial, sans-serif;
  text-align: center;
}

.journey-map a strong {
  font-size: 8px;
  line-height: 1.35;
}

.journey-map a:hover,
.journey-map a.is-active {
  color: var(--forest-deep);
  background: #a8c97a38;
  transform: translateX(2px);
}

.journey-map a.is-active span {
  color: #fff;
  border-radius: 50%;
  background: var(--forest);
  line-height: 21px;
}

/* 章のラベル */
.chapter-label {
  position: absolute;
  z-index: 3;
  top: 34px;
  left: max(38px, calc(50% - 660px));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #1c4b4270;
  font: 800 9px/1.4 Arial, var(--font-rounded);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.chapter-label::before {
  width: 26px;
  height: 1px;
  background: currentColor;
  content: "";
}

.specialist .chapter-label,
.contact-band .chapter-label {
  color: #ffffff8c;
}

/* Hero — 門をくぐる一画面 */
.hero {
  min-height: 100svh;
  padding: 132px 0 150px;
  background:
    radial-gradient(ellipse at 14% 6%, #fff 0 13%, transparent 38%),
    radial-gradient(circle at 92% 12%, #a8c97a57, transparent 28%),
    linear-gradient(145deg, #fffaf0 0 52%, #e8f0de 100%);
}

.hero::before {
  bottom: -170px;
  left: -8%;
  width: 64%;
  height: 285px;
  background: var(--forest);
  transform: rotate(5deg);
}

.hero::after {
  right: -8%;
  bottom: -178px;
  width: 61%;
  height: 300px;
  background: var(--forest-soft);
  transform: rotate(-5deg);
}

.hero-inner {
  grid-template-columns: minmax(0, .9fr) minmax(480px, 1.1fr);
  gap: clamp(44px, 5vw, 92px);
  min-height: calc(100svh - 290px);
}

.hero-copy {
  padding-left: clamp(12px, 3vw, 44px);
}

.hero h1 {
  color: var(--forest-deep);
  font-size: clamp(57px, 5.5vw, 86px);
  line-height: 1.22;
  letter-spacing: -.015em;
}

.hero h1 em {
  position: relative;
  z-index: 0;
  color: var(--forest);
}

.hero h1 em::after {
  position: absolute;
  z-index: -1;
  right: -.12em;
  bottom: .02em;
  left: -.04em;
  height: .24em;
  border-radius: 50%;
  background: var(--sun-soft);
  content: "";
  transform: rotate(-2deg);
}

.h1-context {
  color: var(--forest-soft);
}

.eyebrow {
  color: var(--forest);
}

.specialist-badge {
  border: 1px solid #1c4b4238;
  background: #ffffffb8;
  box-shadow: 0 13px 34px #1c4b4212;
}

.button-primary {
  background: var(--forest);
  box-shadow: 0 12px 26px #1c4b4238;
}

.button-outline {
  color: #a9532d;
  background: #fffaf0ba;
}

.art-arch {
  inset: -26px 0 -42px;
  border: 12px solid #fffaf0;
  border-radius: 48% 48% 18% 18% / 32% 32% 12% 12%;
  box-shadow: 0 42px 100px #183b342b, 0 0 0 1px #1c4b421c;
  transform: rotate(2.4deg);
}

.art-arch::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  box-shadow: inset 0 -90px 90px #17372b35;
}

.art-arch img {
  transform: scale(1.04) rotate(-2.4deg);
}

.deer-note {
  width: min(920px, 100%);
  border: 2px solid #ffffffc9;
  background: #fffaf0f1;
  box-shadow: 0 24px 62px #102f2c35;
}

.deer-avatar {
  border: 2px solid #fff;
  background: var(--sun-soft);
}

/* 全体を一続きの紙芝居に */
main > section {
  overflow: clip;
}

.section {
  padding-top: clamp(112px, 10vw, 166px);
  padding-bottom: clamp(112px, 10vw, 166px);
}

.clinic-summary {
  background:
    linear-gradient(90deg, transparent 49.86%, #d9c59f3b 50%, transparent 50.14%),
    var(--paper);
}

.summary-inner {
  gap: clamp(64px, 8vw, 130px);
}

.clinic-summary h2,
.section-heading h2,
.about h2,
.specialist h2,
.first h2,
.doctor h2,
.faq h2 {
  text-wrap: balance;
}

.fact-grid {
  transform: rotate(1deg);
}

.fact-grid > div {
  border: 0;
  border-radius: 18px 38px 22px 34px;
  background: #fff;
  box-shadow: 0 14px 34px #173d3710;
}

.fact-grid > div:nth-child(2),
.fact-grid > div:nth-child(3) {
  background: #eaf2df;
}

.clinic-photo-feature {
  border: 10px solid #fff;
  border-radius: 34px 34px 120px 34px;
  box-shadow: var(--immersive-shadow);
  transform: rotate(-1deg);
}

.emergency {
  position: relative;
  isolation: isolate;
  padding: 82px 0;
  background: linear-gradient(115deg, #dc714f, var(--sun));
}

.emergency::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .2;
  background-image: radial-gradient(circle at 3px 3px, #fff 1.5px, transparent 1.8px);
  background-size: 28px 28px;
}

.emergency-steps li {
  border: 1px solid #ffffff70;
  background: #6f2e1719;
  box-shadow: inset 0 1px #ffffff52;
}

.concerns {
  background:
    radial-gradient(circle at 8% 16%, #f4d58c4a 0 4%, transparent 16%),
    radial-gradient(circle at 92% 76%, #a8c97a45 0 6%, transparent 19%),
    #fffdf8;
}

.concern-grid {
  align-items: start;
}

.concern-card {
  min-height: 316px;
  border: 0;
  border-radius: 42px 22px 38px 26px;
  box-shadow: 0 18px 48px #173d3711;
}

.concern-card:nth-child(odd) {
  transform: rotate(-1.2deg);
}

.concern-card:nth-child(even) {
  margin-top: 24px;
  transform: rotate(1.2deg);
}

.about {
  border-radius: 0 0 12vw 0;
  background:
    linear-gradient(110deg, #f1e6cf 0 43%, #fffaf0 43.2% 100%);
}

.about-shape {
  width: 560px;
  height: 560px;
  border-color: #1c4b4226;
}

.clinic-photo-stamp {
  border-radius: 7px;
  box-shadow: 0 25px 55px #173d3726;
}

.waiting-photo {
  width: min(390px, 92%);
  transform: rotate(-3.3deg);
}

.specialist {
  background:
    radial-gradient(circle at 84% 17%, #a8c97a1f 0 2px, transparent 3px) 0 0 / 30px 30px,
    linear-gradient(145deg, var(--forest-deep), var(--forest));
}

.specialist::before {
  width: 720px;
  height: 720px;
  border-color: #ffffff17;
}

.specialist-panel {
  border-radius: 48px 20px 48px 20px;
  background: #ffffff0c;
  box-shadow: 0 35px 90px #071b193d;
}

.treatment {
  background:
    linear-gradient(#fffdf8e8, #fffdf8e8),
    repeating-linear-gradient(90deg, transparent 0 59px, #1c4b420d 60px);
}

.treatment-grid {
  gap: 22px;
}

.treatment-card {
  min-height: 330px;
  border: 0;
  border-radius: 24px 48px 30px 44px;
  box-shadow: 0 20px 46px #173d3712;
}

.treatment-card:nth-child(2),
.treatment-card:nth-child(5) {
  transform: translateY(22px);
}

.treatment-card h3 {
  color: var(--forest-deep);
}

.care-stages {
  background:
    radial-gradient(ellipse at 50% 100%, #a8c97a45, transparent 45%),
    #f3ead8;
}

.growth-illustration {
  height: 300px;
  overflow: visible;
}

.stage-grid {
  position: relative;
}

.stage-grid::before {
  position: absolute;
  top: 52px;
  left: 7%;
  width: 86%;
  height: 3px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--trail) 0 10px, transparent 10px 18px);
  content: "";
}

.stage-card {
  border: 0;
  border-radius: 44px 24px 70px 30px;
  box-shadow: 0 20px 48px #173d3711;
}

.first {
  background:
    radial-gradient(circle at 8% 16%, #fff 0 2px, transparent 3px) 0 0 / 42px 42px,
    linear-gradient(145deg, #e5f0dd, #fffaf0 62%);
}

.visit-steps {
  counter-reset: visit;
}

.visit-steps li {
  border: 0;
  border-radius: 24px 45px 24px 45px;
  box-shadow: 0 18px 42px #173d3711;
}

.visit-steps li:nth-child(2) {
  transform: translateX(22px);
}

.visit-steps li > span {
  background: var(--forest);
  box-shadow: 0 8px 22px #1c4b4230;
}

.doctor {
  background:
    linear-gradient(90deg, #fffdf8 0 58%, #f2e6cf 58% 100%);
}

.doctor-portrait {
  border: 12px solid #fff;
  border-radius: 120px 28px 28px 28px;
  box-shadow: var(--immersive-shadow);
  transform: rotate(-1.2deg);
}

.doctor-portrait > img {
  border-radius: 106px 18px 18px 18px;
}

.doctor-copy {
  position: relative;
  z-index: 1;
}

.credentials li {
  border-radius: 999px;
  background: #ffffff94;
}

.access {
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, #a8c97a22, transparent 24%),
    linear-gradient(145deg, var(--forest-deep), #23594e);
}

.access .kicker,
.access .section-heading > p:last-child {
  color: #ffffffad;
}

.google-map-wrap {
  border: 10px solid #fff;
  border-radius: 30px 80px 30px 30px;
  box-shadow: 0 30px 80px #071b1942;
  transform: rotate(-1deg);
}

.clinic-info {
  color: var(--ink);
  border-radius: 32px 70px 32px 32px;
  background: var(--paper);
  box-shadow: 0 30px 80px #071b1933;
  padding: clamp(30px, 4vw, 58px);
}

.garden-photo {
  border-color: #fff;
}

.knowledge {
  background:
    radial-gradient(circle at 80% 10%, #f9d59d52, transparent 18%),
    var(--paper);
}

.knowledge-illustration {
  height: 330px;
  overflow: visible;
}

.medical-review-note {
  border: 0;
  background: #fff;
  box-shadow: 0 14px 38px #173d3710;
}

.knowledge-grid {
  gap: 20px;
}

.knowledge-card {
  border: 0;
  border-radius: 30px 50px 32px 46px;
  box-shadow: 0 18px 42px #173d3710;
}

.related {
  background: #e8f0de;
}

.related-card {
  border: 0;
  border-radius: 26px 42px 26px 42px;
  box-shadow: 0 16px 38px #173d370d;
}

.faq {
  background:
    linear-gradient(90deg, #f3ead8 0 35%, #fffdf8 35% 100%);
}

.faq-list details {
  margin-bottom: 10px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px #173d370c;
}

.faq-list summary {
  padding: 0 20px;
}

.faq-list details > p {
  padding-bottom: 22px;
}

.contact-band {
  padding-top: 130px;
  padding-bottom: 130px;
  background:
    radial-gradient(circle at 16% 18%, #fff 0 1.5px, transparent 2px) 0 0 / 34px 34px,
    linear-gradient(125deg, #316d5e, var(--forest));
}

.contact-band > a {
  box-shadow: 0 20px 48px #071b1930;
  transition: transform .25s ease, box-shadow .25s ease;
}

.contact-band > a:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 26px 56px #071b1940;
}

footer {
  background: var(--forest-deep);
}

.privacy-details {
  margin-top: 42px;
  border-top: 1px solid #ffffff20;
  border-bottom: 1px solid #ffffff20;
}

.privacy-details summary {
  position: relative;
  padding: 17px 34px 17px 0;
  color: #ffffff9c;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.privacy-details summary::-webkit-details-marker {
  display: none;
}

.privacy-details summary::after {
  position: absolute;
  right: 4px;
  content: "+";
  font-size: 18px;
  font-weight: 400;
}

.privacy-details[open] summary::after {
  content: "−";
}

.privacy-details > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 0 0 20px;
}

.privacy-details p {
  max-width: 880px;
  margin: 0;
  color: #ffffff70;
  font-size: 10px;
  line-height: 1.9;
}

.privacy-details a {
  color: #b9d7ca;
  font-size: 10px;
  font-weight: 700;
}

/* 鹿さん探し */
.js .deer-game {
  display: grid;
}

.deer-game {
  position: fixed;
  z-index: 46;
  right: 22px;
  bottom: 22px;
  display: none;
  grid-template-columns: 26px auto;
  align-items: center;
  min-width: 152px;
  padding: 11px 14px;
  border: 1px solid #ffffffa8;
  border-radius: 18px;
  color: var(--forest);
  background: #fffaf0e8;
  box-shadow: 0 14px 40px #173d3726;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.deer-game > span {
  grid-row: span 2;
  color: var(--sun);
  font-size: 18px;
}

.deer-game strong {
  font-size: 9px;
}

.deer-game small {
  color: #1c4b4280;
  font: 700 9px Arial, sans-serif;
}

.deer-game.is-complete {
  color: #fff;
  background: #1c4b42ed;
}

.deer-discovery {
  pointer-events: auto;
  cursor: pointer;
  transition: filter .3s ease;
}

.deer-discovery:focus-visible {
  border-radius: 50%;
  outline: 4px solid var(--sun);
  outline-offset: 6px;
}

.deer-discovery::after {
  position: absolute;
  z-index: 5;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--sun);
  box-shadow: 0 6px 16px #6d3c1930;
  content: "?";
  font: 800 13px Arial, sans-serif;
}

.deer-discovery.is-found {
  filter: drop-shadow(0 0 12px #f4c566b8);
}

.deer-discovery.is-found::after {
  content: "✓";
  background: var(--forest);
}

.deer-spark {
  position: fixed;
  z-index: 200;
  color: var(--sun);
  pointer-events: none;
  font-size: 20px;
  animation: deer-spark .9s ease-out forwards;
}

/* スクロールで紙芝居が静かに開く */
.reveal-ready .reveal-item {
  opacity: 0;
  transform: translateY(28px) scale(.985);
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .75, .2, 1);
}

.reveal-ready .reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-ready .reveal-item:nth-child(2) { transition-delay: .06s; }
.reveal-ready .reveal-item:nth-child(3) { transition-delay: .12s; }
.reveal-ready .reveal-item:nth-child(4) { transition-delay: .18s; }
.reveal-ready .reveal-item:nth-child(5) { transition-delay: .24s; }
.reveal-ready .reveal-item:nth-child(6) { transition-delay: .30s; }

@keyframes deer-spark {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.6) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--spark-x), var(--spark-y)) scale(1.35) rotate(90deg); }
}

@media (width <= 1500px) {
  .journey-map {
    left: 8px;
    width: 42px;
    padding-inline: 8px;
  }

  .journey-map p,
  .journey-map a strong {
    display: none;
  }

  .journey-map a {
    grid-template-columns: 1fr;
  }
}

@media (width <= 1180px) {
  .journey-map {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr .82fr;
  }

  .chapter-label {
    left: 32px;
  }

  .doctor {
    background: #fffdf8;
  }
}

@media (width <= 920px) {
  html {
    scroll-padding-top: 92px;
  }

  .site-header,
  .site-header.is-scrolled {
    top: 8px;
    width: calc(100% - 18px);
    border-radius: 20px;
  }

  .header-inner {
    min-height: 68px;
  }

  .mobile-nav {
    top: calc(100% + 7px);
    border: 1px solid #ffffffb8;
    border-radius: 20px;
    background: #fffaf0f4;
    overflow: hidden;
  }

  .hero {
    padding-top: 126px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-inline: 7vw;
  }

  .hero-art {
    min-height: 680px;
  }

  .art-arch {
    inset: 0 5% -28px;
  }

  .about {
    background: var(--paper-deep);
  }

  .concern-card:nth-child(even),
  .treatment-card:nth-child(2),
  .treatment-card:nth-child(5),
  .visit-steps li:nth-child(2) {
    margin-top: 0;
    transform: none;
  }

  .doctor-portrait {
    transform: none;
  }

  .access-grid {
    align-items: start;
  }

  .privacy-details > div {
    grid-template-columns: 1fr;
  }
}

@media (width <= 640px) {
  .chapter-label {
    top: 25px;
    left: 18px;
    font-size: 8px;
  }

  .site-header .official-logo {
    width: 50px;
    height: 34px;
  }

  .site-header .brand strong {
    font-size: 16px;
  }

  .hero {
    min-height: auto;
    padding: 112px 0 172px;
  }

  .hero-copy {
    padding-inline: 0;
  }

  .hero h1 {
    font-size: clamp(41px, 12.2vw, 56px);
  }

  .hero-art {
    min-height: 460px;
    margin-inline: -4px;
  }

  .art-arch {
    inset: 0 -2px -12px;
    border-width: 7px;
  }

  .deer-note {
    border-radius: 24px 24px 44px 24px;
  }

  .section {
    padding-top: 102px;
    padding-bottom: 102px;
  }

  .clinic-summary {
    background: var(--paper);
  }

  .fact-grid {
    transform: none;
  }

  .fact-grid > div {
    border-radius: 17px 32px 17px 32px;
  }

  .emergency {
    padding: 78px 0;
  }

  .concern-card,
  .concern-card:nth-child(odd) {
    min-height: 0;
    transform: none;
  }

  .about {
    border-radius: 0 0 70px 0;
  }

  .specialist-panel {
    border-radius: 32px 16px 32px 16px;
  }

  .treatment-card {
    border-radius: 22px 38px 22px 38px;
  }

  .growth-illustration,
  .knowledge-illustration {
    height: 205px;
  }

  .stage-grid::before {
    display: none;
  }

  .doctor-portrait {
    border-width: 7px;
    border-radius: 70px 22px 22px 22px;
  }

  .doctor-portrait > img {
    border-radius: 60px 15px 15px 15px;
  }

  .google-map-wrap {
    border-width: 7px;
    border-radius: 24px 54px 24px 24px;
    transform: none;
  }

  .clinic-info {
    border-radius: 24px 48px 24px 24px;
    padding: 28px 20px;
  }

  .knowledge-card {
    border-radius: 24px 38px 24px 38px;
  }

  .faq {
    background: #fffdf8;
  }

  .faq-list summary {
    padding: 0 13px;
  }

  .contact-band {
    padding-top: 105px;
    padding-bottom: 112px;
  }

  .deer-game {
    right: 10px;
    bottom: 78px;
    min-width: 132px;
    padding: 9px 11px;
    opacity: .92;
  }

  .deer-game strong {
    font-size: 8px;
  }

  .deer-discovery::after {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  footer {
    padding-bottom: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-progress span,
  .site-header,
  .journey-map a,
  .deer-discovery,
  .reveal-ready .reveal-item {
    transition: none;
  }

  .reveal-ready .reveal-item {
    opacity: 1;
    transform: none;
  }

  .deer-spark {
    display: none;
  }
}

/* =========================================================
   Immersive storybook pass 02
   章ナビの衝突解消・探検手帳・専門医の森・広告枠の夜景化
   ========================================================= */

body.forest-journey {
  background: var(--forest-deep);
}

main {
  position: relative;
  z-index: 1;
  background: var(--paper);
}

/* 森のコンパス：本文の外側に浮かぶ、細い章案内 */
@media (min-width: 1181px) {
  .journey-map {
    top: 50%;
    right: 14px;
    bottom: auto;
    left: auto;
    display: grid;
    gap: 7px;
    width: 50px;
    padding: 12px 8px;
    border-radius: 25px;
    transform: translateY(-50%);
  }

  .journey-map p {
    display: grid;
    place-items: center;
    height: 27px;
    margin: 0 0 2px;
    font-size: 0;
  }

  .journey-map p span {
    font-size: 14px;
  }

  .journey-map a {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    width: 32px;
    min-height: 32px;
    margin-inline: auto;
    border-radius: 50%;
  }

  .journey-map a span {
    width: 24px;
    font-size: 8px;
  }

  .journey-map a strong {
    position: absolute;
    top: 50%;
    right: 43px;
    display: block;
    width: max-content;
    max-width: 160px;
    padding: 8px 11px;
    border: 1px solid #ffffff7d;
    border-radius: 10px;
    color: #fff;
    background: #163f3ae8;
    box-shadow: 0 8px 24px #102f2c26;
    font-size: 9px;
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -50%);
    transition: opacity .2s ease, transform .2s ease;
  }

  .journey-map a:hover strong,
  .journey-map a:focus-visible strong,
  .journey-map a.is-active strong {
    opacity: 1;
    transform: translate(0, -50%);
  }

  .journey-map a.is-active strong {
    color: var(--forest-deep);
    background: #fffaf0f5;
  }
}

/* 門の向こうへ進む招待状 */
.enter-forest {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 34px;
  width: min(100%, 390px);
  margin-top: 24px;
  padding: 14px 16px 14px 18px;
  border: 1px dashed #1c4b4252;
  border-radius: 18px 34px 18px 34px;
  color: var(--forest);
  background: #fffaf0b5;
  box-shadow: 0 12px 30px #173d3710;
  transition: transform .25s ease, background-color .25s ease;
}

.enter-forest:hover {
  background: #fff;
  transform: translateY(-3px) rotate(-.4deg);
}

.enter-forest span,
.enter-forest strong {
  display: block;
}

.enter-forest span {
  margin-bottom: 4px;
  color: #1c4b4280;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}

.enter-forest strong {
  font-size: 12px;
  letter-spacing: .06em;
}

.enter-forest i {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: auto;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
  font-style: normal;
}

.hero-art {
  translate: var(--hero-depth-x, 0px) var(--hero-depth-y, 0px);
  transition: translate .35s cubic-bezier(.2, .7, .2, 1);
}

.paper-noise::after {
  position: absolute;
  top: 18%;
  right: 2.5%;
  width: 130px;
  height: 180px;
  content: "";
  opacity: .22;
  background:
    radial-gradient(ellipse at 20% 15%, var(--forest) 0 7px, transparent 8px),
    radial-gradient(ellipse at 43% 9%, var(--forest) 0 7px, transparent 8px),
    radial-gradient(ellipse at 62% 22%, var(--forest) 0 7px, transparent 8px),
    radial-gradient(ellipse at 42% 34%, var(--forest) 0 15px, transparent 16px);
  transform: rotate(24deg);
}

.hero-mini-guide {
  display: none;
}

/* 章札を、旅のスタンプとして見せる */
.chapter-label {
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #fffaf0b5;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.chapter-label::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.specialist .chapter-label,
.access .chapter-label,
.contact-band .chapter-label {
  color: #ffffff9c;
  background: #ffffff0d;
}

/* 専門医の森：大見出し・証明・診療室を一つの風景に */
.specialist-inner {
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
  align-items: start;
  gap: clamp(58px, 6vw, 96px);
}

.specialist-intro {
  max-width: 670px;
}

.specialist h2 {
  max-width: 11.5em;
  font-size: clamp(40px, 3.25vw, 58px);
  line-height: 1.55;
}

.specialist-certification p,
.specialist-panel p {
  color: #ffffffc4;
}

.specialist-certification {
  max-width: 590px;
  padding: 18px 20px;
  border: 1px solid #ffffff20;
  border-radius: 22px 42px 22px 42px;
  background: #ffffff0b;
}

.treatment-room-photo {
  width: min(440px, 86%);
  margin-top: 48px;
  margin-right: auto;
  margin-left: 7%;
  padding: 10px 10px 15px;
  transform: rotate(-2.3deg);
}

.treatment-room-photo img {
  aspect-ratio: 4 / 3;
  background: #e9deca;
}

.specialist-panel {
  position: sticky;
  top: 118px;
  margin-top: 66px;
}

/* 鹿さん探しを「探検手帳」に */
.deer-game {
  grid-template-columns: 62px minmax(118px, auto);
  gap: 0 10px;
  min-width: 244px;
  min-height: 86px;
  padding: 10px 14px 10px 8px;
  border-radius: 26px 26px 26px 10px;
  pointer-events: none;
}

.deer-game-guide {
  align-self: end;
  width: 66px;
  height: 76px;
  margin: 0 0 -10px -4px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px #173d3720);
}

.deer-game-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 8px;
}

.deer-game-copy > span {
  grid-column: 1 / -1;
  color: #1c4b4270;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .16em;
}

.deer-game strong {
  font-size: 9px;
}

.deer-stamps {
  grid-column: 2;
  display: flex;
  gap: 4px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.deer-stamps li {
  width: 14px;
  height: 14px;
  border: 1px dashed #1c4b4257;
  border-radius: 50%;
  background: #fff;
}

.deer-stamps li.is-stamped {
  border-style: solid;
  border-color: var(--sun);
  background: var(--sun);
  box-shadow: inset 0 0 0 3px #fffaf0;
  transform: rotate(-8deg) scale(1.08);
}

.deer-game.is-awake .deer-game-guide {
  animation: deer-guide-wave .8s ease both;
}

.deer-game.is-complete .deer-game-copy > span,
.deer-game.is-complete small {
  color: #ffffffa8;
}

.deer-game.is-complete .deer-stamps li {
  border-color: #f5bf68;
  background: #f5bf68;
}

@keyframes deer-guide-wave {
  0%, 100% { rotate: 0deg; }
  35% { rotate: -5deg; }
  70% { rotate: 4deg; }
}

/* 子ども向けのカードは、整列しすぎない絵本のリズムへ */
.concern-card:nth-child(1),
.treatment-card:nth-child(1),
.knowledge-card:nth-child(1) {
  border-top-left-radius: 62px;
}

.concern-card:nth-child(4),
.treatment-card:nth-child(6),
.knowledge-card:nth-child(6) {
  border-bottom-right-radius: 72px;
}

.treatment-card::after,
.knowledge-card::after {
  position: absolute;
  top: 16px;
  right: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 5px #f2a34e18;
  content: "";
}

.knowledge-card {
  position: relative;
}

/* 忍者ホームページの必須広告枠を隠さず、フッターの夜の森へつなぐ */
.forest-journey > footer ~ div:not(.mobile-cta) {
  position: relative;
  isolation: isolate;
  margin: 0 !important;
  color: #ffffff70;
  border-top: 1px solid #ffffff12;
  background:
    radial-gradient(circle at 8% 32%, #fff 0 1px, transparent 1.7px) 0 0 / 54px 54px,
    radial-gradient(circle at 74% 61%, #a8c97a 0 1px, transparent 1.8px) 0 0 / 72px 72px,
    var(--forest-deep) !important;
}

.forest-journey > footer ~ div:not(.mobile-cta)::before {
  position: absolute;
  z-index: -1;
  top: 25px;
  left: 50%;
  color: #ffffff24;
  content: "NARA · IKEO PEDIATRIC DENTAL CLINIC";
  font: 700 8px/1 Arial, sans-serif;
  letter-spacing: .22em;
  transform: translateX(-50%);
}

.forest-journey > footer ~ div:not(.mobile-cta)::after {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 100%;
  color: #ffffff40;
  content: "おやすみ、またね。\A 歯みがきも忘れずに。";
  font-family: var(--font-mincho);
  font-size: 13px;
  line-height: 2;
  text-align: center;
  white-space: pre;
  pointer-events: none;
  transform: translate(-50%, -38%);
}

.forest-journey > footer ~ div:not(.mobile-cta) > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 1180px) {
  .specialist-inner {
    grid-template-columns: 1fr;
  }

  .specialist-intro {
    max-width: none;
  }

  .specialist-panel {
    position: relative;
    top: auto;
    margin-top: 0;
  }

  .treatment-room-photo {
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 920px) {
  .enter-forest {
    margin-inline: auto;
  }

  .specialist h2 {
    max-width: 12em;
  }

  .deer-game {
    grid-template-columns: 52px minmax(102px, auto);
    min-width: 210px;
  }

  .deer-game-guide {
    width: 56px;
    height: 66px;
  }
}

@media (max-width: 640px) {
  .enter-forest {
    width: 100%;
    margin-top: 18px;
  }

  .paper-noise::after {
    display: none;
  }

  .hero-mini-guide {
    position: absolute;
    z-index: 3;
    top: 342px;
    right: -21px;
    display: block;
    width: 105px;
    height: 112px;
    pointer-events: none;
    transform: rotate(5deg);
  }

  .hero-mini-guide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px #173d3725);
  }

  .hero-mini-guide span {
    position: absolute;
    right: 57%;
    bottom: 3px;
    width: max-content;
    padding: 5px 8px;
    border: 1px solid #1c4b4224;
    border-radius: 999px;
    color: var(--forest);
    background: #fffaf0eb;
    font-size: 7px;
    font-weight: 800;
  }

  .chapter-label {
    padding: 7px 10px;
  }

  .specialist h2 {
    font-size: 33px;
  }

  .specialist-certification {
    grid-template-columns: 62px 1fr;
    padding: 15px;
  }

  .specialist-certification img {
    width: 62px;
    height: 62px;
  }

  .treatment-room-photo {
    width: 94%;
  }

  .deer-game {
    right: 8px;
    bottom: 76px;
    grid-template-columns: 42px 96px;
    min-width: 154px;
    min-height: 58px;
    padding: 6px 9px 6px 4px;
    border-radius: 19px 19px 19px 8px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease;
  }

  .deer-game.is-started {
    opacity: .94;
    transform: translateY(0);
  }

  .deer-game-guide {
    width: 46px;
    height: 54px;
    margin-bottom: -6px;
  }

  .deer-game-copy > span {
    display: none;
  }

  .deer-game strong {
    grid-column: 1 / -1;
    font-size: 8px;
  }

  .deer-game small {
    display: none;
  }

  .deer-stamps {
    gap: 3px;
    margin-top: 5px;
  }

  .deer-stamps li {
    width: 11px;
    height: 11px;
  }

  .forest-journey > footer ~ div:not(.mobile-cta)::before {
    width: 100%;
    text-align: center;
    font-size: 6px;
  }
}
