* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  overflow-x: hidden;
  overflow-y: auto;
  background: #0a0a0a;
  font-family: 'Noto Serif JP', 'Georgia', serif;
  cursor: crosshair;
}

/* ═══════════ Canvas ═══════════ */
#scene {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  transition: opacity 0.8s ease;
}
#scene.dimmed { opacity: 0.12; pointer-events: none; }

/* ═══════════ Hero ═══════════ */
#hero { position: relative; width: 100%; height: 100vh; z-index: 1; }

/* ═══════════ Scene-to-Section Fade ═══════════ */
#scene-fade {
  position: relative;
  z-index: 2;
  height: 35vh;
  margin-top: -5vh;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(10,10,10,0.15) 15%,
    rgba(10,10,10,0.5) 35%,
    rgba(42,36,32,0.7) 55%,
    #ddd5c8 80%,
    #e8e0d4 100%
  );
}

/* ═══════════ Loader ═══════════ */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; color: #e8d5c4; }
.loader-kanji { font-size: 5rem; letter-spacing: 0.3em; margin-bottom: 2rem; animation: pulse 2s ease-in-out infinite; }
.loader-bar { width: 200px; height: 2px; background: rgba(232,213,196,0.2); margin: 0 auto 1rem; overflow: hidden; }
.loader-fill { width: 0%; height: 100%; background: #e8d5c4; transition: width 0.3s ease; }
.loader-text { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; }

/* ═══════════ Overlay ═══════════ */
#overlay {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
  transition: opacity 2s ease 0.5s;
}
#overlay.visible { opacity: 1; }
#overlay.faded { opacity: 0; transition: opacity 0.6s ease; }
.title {
  font-size: 6rem; color: rgba(255,255,255,0.85); letter-spacing: 0.5em;
  text-shadow: 0 0 40px rgba(255,180,120,0.3), 0 0 80px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
}
.subtitle { font-size: 1.2rem; color: rgba(232,213,196,0.6); letter-spacing: 0.8em; text-transform: uppercase; margin-bottom: 3rem; }
.hint { font-size: 0.7rem; color: rgba(232,213,196,0.3); letter-spacing: 0.3em; text-transform: uppercase; animation: fadeInOut 3s ease-in-out infinite; }

/* ═══════════ Scroll Cue ═══════════ */
#scroll-cue {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 15; display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; pointer-events: none; transition: opacity 1s ease;
}
#scroll-cue.visible { opacity: 1; }
.cue-text { font-size: 0.75rem; color: rgba(232,213,196,0.5); letter-spacing: 0.3em; }
.cue-arrow { font-size: 1.2rem; color: rgba(232,213,196,0.4); animation: bounceDown 2s ease-in-out infinite; }

/* ═══════════ MAP SECTION — Parchment Split Layout ═══════════ */
#map-section {
  position: relative; z-index: 20;
  display: flex;
  min-height: 100vh;
  background: #e8e0d4;
  color: #2a2420;
}

/* Left: Sticky Map */
.map-side {
  width: 50%;
  position: relative;
}
.map-side-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #ddd5c8;
}
.map-wrapper {
  position: relative;
  width: 100%;
  max-width: 560px;
}
.map-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  filter: brightness(1.1) contrast(1.05);
  box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

/* ═══════════ Hotspots (blue dot style like reference) ═══════════ */
.hotspot {
  position: absolute; transform: translate(-50%, -50%);
  background: none; border: none; cursor: pointer; padding: 0;
  z-index: 5; outline: none;
  width: 14%; aspect-ratio: 1;
  overflow: visible;
  transition: opacity 0.3s ease;
}
.hotspot-dot {
  display: block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #0068fe;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 8px rgba(0,104,254,0.6), 0 0 20px rgba(0,104,254,0.3);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  transition: all 0.3s ease;
}
/* Radar rings — scale(0)→scale(1), identical to ogud.co.jp */
.hotspot::before,
.hotspot::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #0068fe;
  opacity: 0;
  animation: pulsate 4s linear infinite;
  pointer-events: none;
}
.hotspot::after {
  animation-delay: 2s;
}
.hotspot-label {
  position: absolute; top: 50%; left: calc(100% + 8px); transform: translateY(-50%);
  white-space: nowrap; font-size: 0.75rem; font-weight: 600;
  color: #2a2420; letter-spacing: 0.1em;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
  background: rgba(232,224,212,0.9); padding: 2px 8px; border-radius: 3px;
}
.hotspot:hover .hotspot-dot {
  transform: translate(-50%, -50%) scale(2);
  box-shadow: 0 0 8px rgba(0,104,254,0.5);
}
.hotspot:hover .hotspot-label { opacity: 1; }
.hotspot.is-active .hotspot-dot {
  transform: translate(-50%, -50%) scale(2);
  box-shadow: 0 0 10px rgba(0,104,254,0.5);
}
.hotspot.is-active::before,
.hotspot.is-active::after { animation: none; opacity: 0; }
.hotspot.is-active .hotspot-label { opacity: 1; }
.map-wrapper.has-active .hotspot:not(.is-active) { opacity: 0.5; }

/* Radar pulsate — scale(0)→scale(1) like ogud.co.jp reference */
@keyframes pulsate {
  0%   { transform: scale(0); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}

/* ═══════════ Right: Detail Side ═══════════ */
.detail-side {
  width: 50%;
  min-height: 100vh;
  padding: 80px 50px 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.detail-placeholder {
  text-align: center;
  opacity: 0.4;
}
.detail-placeholder-text {
  font-size: 1rem; letter-spacing: 0.1em; margin-bottom: 8px; color: #5a504a;
}
.detail-placeholder-sub {
  font-size: 0.8rem; letter-spacing: 0.15em; color: #8a7e74;
}

/* ═══════════ Detail Content ═══════════ */
.zone-title-box {
  border: 1px solid #3a3530;
  border-radius: 30px;
  padding: 10px 30px;
  display: inline-block;
  margin-bottom: 20px;
}
.zone-title {
  font-size: 1.1rem; letter-spacing: 0.2em; color: #2a2420; font-weight: 500;
}
.zone-description {
  font-size: 0.9rem; line-height: 1.9; color: #4a4440;
  margin-bottom: 30px; letter-spacing: 0.03em;
}

/* ═══════════ Before/After Comparison Slider ═══════════ */
.compare-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  cursor: ew-resize;
  user-select: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.compare-container img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare-after {
  clip-path: inset(0 0 0 50%);
}
.compare-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: #fff;
  z-index: 10;
  transform: translateX(-50%);
  pointer-events: none;
}
.compare-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 11;
}
.compare-handle svg {
  width: 20px; height: 20px; fill: #333;
}
.compare-labels {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-size: 0.7rem; letter-spacing: 0.15em; color: #8a7e74;
}
.credit-line {
  margin-top: 12px;
  font-size: 0.7rem; color: #aaa09a; letter-spacing: 0.05em;
}

/* Detail entrance animation */
.detail-content > * {
  opacity: 0; transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.detail-content.animate-in > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.detail-content.animate-in > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.detail-content.animate-in > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.detail-content.animate-in > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.detail-content.animate-in > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }

/* ═══════════ Animations ═══════════ */
@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes fadeInOut { 0%, 100% { opacity: 0.1; } 50% { opacity: 0.4; } }
@keyframes bounceDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ═══════════ SANPAI SECTION — Worship Steps with Layer Crossfade ═══════════ */
#sanpai-section {
  position: relative; z-index: 20;
  background: #e8e0d4;
  color: #2a2420;
}

/* Header */
.sanpai-header {
  text-align: center;
  padding: 80px 40px 40px;
}
.sanpai-heading {
  font-size: 2rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin-bottom: 8px;
}
.sanpai-subheading {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: #8a7e74;
}

/* Body: Split Layout */
.sanpai-body {
  display: flex;
  min-height: 100vh;
}

/* Left: Sticky Map */
.sanpai-map-side {
  width: 50%;
  position: relative;
}
.sanpai-map-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 20px;
  background: #ddd5c8;
}
.sanpai-map-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
}
.sanpai-map-base {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  filter: brightness(1.05) contrast(1.02);
  box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

/* ── Layer Overlays: The Core Crossfade Technique ── */
.sanpai-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  border-radius: 4px;
}
.sanpai-layer.is-visible {
  opacity: 1;
}

/* Spotlight glow on active step location */
.sanpai-spotlight {
  position: absolute;
  width: 80px; height: 80px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,104,254,0.25) 0%, rgba(0,104,254,0.08) 40%, transparent 70%);
  animation: spotlightPulse 2.5s ease-in-out infinite;
}

/* SVG path overlay */
.sanpai-path {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

/* Pulsing dot that moves to current step */
.sanpai-dot {
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0, 104, 254, 0.8);
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 12px rgba(0,104,254,0.5);
  transform: translate(-50%, -50%);
  transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes spotlightPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* Step Navigation */
.sanpai-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sanpai-btn {
  width: 36px; height: 36px;
  border: 1px solid rgba(42,36,32,0.3);
  border-radius: 50%;
  background: rgba(232,224,212,0.8);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
  color: #2a2420;
}
.sanpai-btn:hover {
  background: rgba(42,36,32,0.1);
  border-color: rgba(42,36,32,0.5);
}
.sanpai-btn svg { width: 18px; height: 18px; }

.sanpai-dots {
  display: flex;
  gap: 8px;
}
.sanpai-dot-btn {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(42,36,32,0.4);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}
.sanpai-dot-btn.is-active {
  background: #0068fe;
  border-color: #0068fe;
  transform: scale(1.3);
}
.sanpai-dot-btn:hover:not(.is-active) {
  border-color: rgba(42,36,32,0.7);
  background: rgba(42,36,32,0.1);
}

/* Auto-play progress bar */
.sanpai-progress {
  width: 100%;
  max-width: 520px;
  height: 2px;
  background: rgba(42,36,32,0.1);
  border-radius: 1px;
  overflow: hidden;
}
.sanpai-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0068fe, #4a9eff);
  transition: width 0.1s linear;
}

/* Right: Step Detail Panel */
.sanpai-detail-side {
  width: 50%;
  min-height: 100vh;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sanpai-detail {
  max-width: 480px;
}

/* Step Content */
.sanpai-step-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #8a7e74;
  text-transform: uppercase;
}
.sanpai-step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #0068fe;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
}
.sanpai-step-title {
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-bottom: 6px;
  color: #2a2420;
}
.sanpai-step-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: #8a7e74;
  margin-bottom: 24px;
}
.sanpai-step-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  margin-bottom: 24px;
}
.sanpai-step-desc {
  font-size: 0.9rem;
  line-height: 2;
  color: #4a4440;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}
.sanpai-step-tip {
  font-size: 0.8rem;
  line-height: 1.8;
  color: #7a6e64;
  padding: 12px 16px;
  background: rgba(42,36,32,0.04);
  border-left: 3px solid rgba(0,104,254,0.4);
  border-radius: 0 4px 4px 0;
}
.sanpai-step-tip strong {
  color: #4a4440;
}

/* Detail entrance animation — staggered children */
.sanpai-detail > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.sanpai-detail.animate-in > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.sanpai-detail.animate-in > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.08s; }
.sanpai-detail.animate-in > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.16s; }
.sanpai-detail.animate-in > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
.sanpai-detail.animate-in > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.32s; }
.sanpai-detail.animate-in > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }

/* ═══════════ SERVICES SECTION — Horizontal Scroll Cards ═══════════ */
#services-section {
  position: relative;
  z-index: 20;
  background: #e8e0d4;
  color: #2a2420;
  overflow-x: clip;
}

/* Header */
.services-header {
  text-align: center;
  padding: 100px 40px 60px;
}
.services-heading {
  font-size: 2rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin-bottom: 8px;
}
.services-subheading {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: #8a7e74;
  margin-bottom: 24px;
}
.services-intro {
  font-size: 0.85rem;
  line-height: 1.9;
  color: #6a5e54;
  letter-spacing: 0.03em;
  max-width: 520px;
  margin: 0 auto;
}

/* Scroll wrapper */
.services-scroll-wrap {
  overflow: hidden;
  touch-action: pan-y;
}

/* Horizontal card list */
.services-list {
  display: flex;
  flex-direction: row;
  gap: 60px;
  padding: 40px 63px 80px;
  padding-right: 35vw; /* extra space so last card is fully visible */
  will-change: transform;
}

/* ── Individual Card ── */
.service-card {
  flex: 0 0 auto;
  width: clamp(420px, 38vw, 580px);
  background: rgba(232,224,212,0.6);
  border: 1px solid rgba(42,36,32,0.08);
  border-radius: 12px;
  padding: 40px;
  position: relative;
  /* speech-bubble tail effect */
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.06));
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 80px;
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid rgba(232,224,212,0.6);
}

.service-card-inner {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Text side */
.service-card-text {
  flex: 1;
  min-width: 0;
}
.service-num {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(42,36,32,0.15);
  margin-bottom: 12px;
  line-height: 1;
  font-family: 'Noto Serif JP', serif;
}
.service-title {
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  font-weight: 500;
  margin-bottom: 6px;
  color: #2a2420;
}
.service-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: #8a7e74;
  margin-bottom: 20px;
}
.service-desc {
  font-size: 0.82rem;
  line-height: 2;
  color: #5a504a;
  letter-spacing: 0.02em;
}

/* Visual side */
.service-card-visual {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}

/* ── Flip Image ── */
.service-flip {
  position: relative;
  width: 100%;
}
.service-flip-img {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transform-style: preserve-3d;
  perspective: 800px;
  will-change: transform;
}
.service-flip-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-flip-img .js-flip-after {
  z-index: 2;
  opacity: 0;
  /* Force browser to decode image even when hidden */
  content-visibility: auto;
}

/* Flip trigger button */
.service-flip-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px auto 0;
  padding: 8px 20px;
  background: #0068fe;
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  transition: all 0.3s ease;
  font-family: inherit;
}
.service-flip-btn:hover {
  background: #0054d4;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,104,254,0.3);
}
.service-flip-btn svg {
  transition: transform 0.3s ease;
}
.service-flip-btn:hover svg {
  transform: rotate(-45deg);
}

/* Background illustration */
.service-card-illust {
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 120px;
  opacity: 0.15;
  pointer-events: none;
}
.service-card-illust img {
  width: 100%;
  height: auto;
}

/* ═══════════ FUTURE SECTION — Scroll Zoom Illustration ═══════════ */
#future-section {
  position: relative;
  z-index: 20;
  background: #e8e0d4;
  color: #2a2420;
}

.future-header {
  text-align: center;
  padding: 100px 40px 50px;
}
.future-heading {
  font-size: 2rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin-bottom: 8px;
}
.future-subheading {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: #8a7e74;
}

/* Diagram container — pinned viewport */
.future-diagram {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #e8e0d4;
}

/* Scene layers — centered absolute, height matches container */
.future-scene {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  z-index: 1;
  will-change: width, opacity;
}
#future-scene-1 { width: 50%; z-index: 1; }
#future-scene-2 { width: 50%; z-index: 2; opacity: 0; }
#future-scene-3 { width: 50%; z-index: 3; opacity: 0; }
#future-scene-4 { width: 50%; z-index: 4; opacity: 0; }
#future-scene-5 { width: 50%; z-index: 5; opacity: 0; }
#future-scene-6 { width: 50%; z-index: 6; opacity: 0; }
#future-scene-7 { width: 50%; z-index: 7; opacity: 0; }

.future-scene-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Caption pills — positioned at bottom right */
.future-caption {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 10;
  margin: 0;
  transform: translateY(120%);
  opacity: 0;
}
.future-caption-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(232,224,212,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(42,36,32,0.15);
  border-radius: 30px;
  padding: 10px 24px;
  white-space: nowrap;
}
.future-caption-num {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #2a2420;
}
.future-caption-divider {
  width: 1px;
  height: 28px;
  background: rgba(42,36,32,0.2);
}
.future-caption-title {
  font-size: 1.15rem;
  letter-spacing: 0.25em;
  font-weight: 500;
  color: #2a2420;
}
.future-caption-desc {
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: #6a5e54;
  white-space: normal;
  max-width: 220px;
}

/* ═══════════ GALLERY SECTION — Scattered Photo Grid ═══════════ */
#gallery-section {
  position: relative;
  z-index: 20;
  background: #e8e0d4;
  color: #2a2420;
  padding-bottom: 80px;
}

.gallery-header {
  text-align: center;
  padding: 100px 40px 60px;
}
.gallery-heading {
  font-size: 2rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin-bottom: 8px;
}
.gallery-subheading {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: #8a7e74;
}

/* 29-column scattered grid like ogud.co.jp reference */
.gallery-grid {
  display: grid;
  grid-template-rows: repeat(40, 1fr);
  grid-template-columns: repeat(29, 1fr);
  aspect-ratio: 29 / 40;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 0;
}

/* Thumbnail container */
.gallery-thumb {
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); /* hidden by default */
}

/* Warm mist overlay that slides up — ethereal shrine feel */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(232,224,212,0.95), rgba(221,213,200,0.7));
  z-index: 2;
  bottom: 0;
}

/* Image */
.gallery-item {
  margin: 0;
  width: 100%;
  height: 100%;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Grid placement: manually scattered positions ── */
/* Row 1-2: top scattered */
.gallery-thumb:nth-child(1)  { grid-area: 1 / 1 / 7 / 7; }      /* spring — large, top-left */
.gallery-thumb:nth-child(2)  { grid-area: 2 / 14 / 5 / 18; }     /* autumn — small, top-center */
.gallery-thumb:nth-child(3)  { grid-area: 1 / 22 / 4 / 26; }     /* festival — small, top-right */
/* Row 2: mid-upper */
.gallery-thumb:nth-child(4)  { grid-area: 5 / 8 / 8 / 12; }      /* dragon — small */
.gallery-thumb:nth-child(5)  { grid-area: 6 / 18 / 12 / 24; }    /* ema — large */
.gallery-thumb:nth-child(6)  { grid-area: 4 / 25 / 9 / 30; }     /* snow — medium */
/* Row 3: middle */
.gallery-thumb:nth-child(7)  { grid-area: 9 / 1 / 15 / 8; }      /* path — large wide */
.gallery-thumb:nth-child(8)  { grid-area: 9 / 10 / 12 / 14; }    /* wedding — small */
.gallery-thumb:nth-child(9)  { grid-area: 13 / 9 / 16 / 13; }    /* roof — small */
.gallery-thumb:nth-child(10) { grid-area: 13 / 15 / 19 / 21; }   /* miko — large */
/* Row 4: mid-lower */
.gallery-thumb:nth-child(11) { grid-area: 17 / 1 / 20 / 5; }     /* hatsumode — small */
.gallery-thumb:nth-child(12) { grid-area: 16 / 22 / 22 / 30; }   /* shichigosan — large wide */
/* Row 5: lower */
.gallery-thumb:nth-child(13) { grid-area: 21 / 5 / 27 / 11; }    /* komainu — large */
.gallery-thumb:nth-child(14) { grid-area: 20 / 13 / 23 / 17; }   /* omikuji — small */
/* Row 6: bottom */
.gallery-thumb:nth-child(15) { grid-area: 24 / 17 / 30 / 25; }   /* evening — large */
.gallery-thumb:nth-child(16) { grid-area: 28 / 1 / 34 / 8; }     /* prayer — large */

/* ═══════════ FOOTER ═══════════ */
#site-footer {
  position: relative;
  z-index: 20;
  background: #e8e0d4;
  color: #2a2420;
  padding: 0 60px 40px;
}

.footer-line {
  height: 1px;
  background: #2a2420;
  position: relative;
  margin: 0 0 40px;
}
.footer-line::before,
.footer-line::after {
  content: '+';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #2a2420;
  line-height: 1;
}
.footer-line::before { left: -20px; }
.footer-line::after { right: -20px; }

/* Contact */
.footer-contact {
  display: flex;
  gap: 80px;
  padding: 40px 0 50px;
  justify-content: center;
}
.footer-contact-block {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.footer-contact-block dt {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  white-space: nowrap;
  min-width: 100px;
}
.footer-contact-block dd {
  font-size: 0.8rem;
  line-height: 1.8;
  color: #5a504a;
  letter-spacing: 0.03em;
}
.footer-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 24px;
  border: 1px solid #2a2420;
  border-radius: 24px;
  color: #2a2420;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}
.footer-btn:hover {
  background: #2a2420;
  color: #e8e0d4;
}

/* Brand + Nav */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 0;
  gap: 30px;
}
.footer-logo {
  font-size: 4rem;
  letter-spacing: 0.5em;
  font-weight: 300;
  color: #2a2420;
  opacity: 0.15;
}
.footer-nav {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-decoration: none;
  color: #5a504a;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.footer-nav a:hover { color: #2a2420; }

/* Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
}
.footer-copy {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #8a7e74;
}
.footer-credit {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #aaa09a;
  font-style: italic;
}

/* ═══════════ Responsive ═══════════ */
@media (max-width: 900px) {
  .title { font-size: 3.5rem; letter-spacing: 0.3em; }
  #map-section { flex-direction: column; }
  .map-side { width: 100%; }
  .map-side-inner { position: relative; height: auto; min-height: 50vh; padding: 20px; }
  .detail-side { width: 100%; padding: 30px 20px; }
  .hotspot-label { opacity: 1; font-size: 0.65rem; }

  /* Sanpai responsive */
  .sanpai-body { flex-direction: column; }
  .sanpai-map-side { width: 100%; }
  .sanpai-map-inner { position: relative; height: auto; min-height: 50vh; padding: 20px; }
  .sanpai-detail-side { width: 100%; padding: 30px 20px; }
  .sanpai-step-title { font-size: 1.2rem; }

  /* Footer responsive */
  #site-footer { padding: 0 20px 30px; }
  .footer-contact { flex-direction: column; gap: 30px; }
  .footer-contact-block { flex-direction: column; gap: 8px; }
  .footer-logo { font-size: 2.5rem; }
  .footer-nav { gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Gallery responsive — flex wrap on mobile */
  .gallery-grid {
    display: flex;
    flex-wrap: wrap;
    aspect-ratio: auto;
    gap: 12px;
    padding: 0 16px;
  }
  .gallery-thumb {
    flex: 0 0 calc(50% - 6px);
    aspect-ratio: 1;
  }
  .gallery-thumb:nth-child(3n+1) {
    flex-basis: calc(65% - 6px);
  }
  .gallery-thumb:nth-child(3n+2) {
    flex-basis: calc(35% - 6px);
  }

  /* Future responsive */
  .future-diagram { aspect-ratio: 1; }
  #future-scene-1 { width: 90%; }
  #future-scene-2 { width: 78%; }
  .future-caption-inner { padding: 8px 16px; gap: 8px; }
  .future-caption-desc { display: none; }

  /* Services responsive */
  .services-list {
    gap: 19px;
    padding: 20px 25px 60px;
  }
  .service-card {
    width: 85vw;
    padding: 24px;
  }
  .service-card-inner {
    flex-direction: column;
    gap: 20px;
  }
  .service-card-visual {
    flex: none;
    width: 100%;
  }
  .service-card-illust { display: none; }
}
