html {
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
}

body {
  overflow-x: hidden;
  overflow-y: hidden;
  position: relative;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

main {
  overflow-x: hidden;
  overflow-y: hidden;
  width: 100%;
  position: relative;
}

/* Tour gallery thumbnails */
#tour-gallery-thumbs {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  #tour-gallery-thumbs::-webkit-scrollbar {
    display: none;
  }
  
  @media (max-width: 1023px) {
    #tour-gallery-thumbs {
      --tour-thumb-cols: 4;
      --tour-thumb-gap: 0.25rem;
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: calc((100% - (var(--tour-thumb-cols) - 1) * var(--tour-thumb-gap)) / var(--tour-thumb-cols));
      gap: var(--tour-thumb-gap);
    }
  }
  
  @media (min-width: 1024px) {
    #tour-gallery-thumbs {
      --tour-thumb-cols: 8;
      --tour-thumb-gap: 0.5rem;
      display: flex;
      gap: var(--tour-thumb-gap);
    }
  
    #tour-gallery-thumbs .tour-thumb {
      flex: 0 0 calc((100% - (var(--tour-thumb-cols) - 1) * var(--tour-thumb-gap)) / var(--tour-thumb-cols));
    }
  }

/* 3단계 통증완화 — Coverflow 3D 카드 슬라이드 (첨부 이미지 기준) */
.anesthesia-carousel {
  /* 화면 폭 기준: 카드 ~22vw + gap 24px → 약 4.5~5장 노출 */
  --anes-card-w: min(72vw, 280px);
  --anes-card-h: min(72vw, 280px);
  --anes-gap: 16px;
  --anes-rotate: 42deg;
  --anes-depth: 140px;
  --anes-inset: 90px;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.anesthesia-stage {
  position: relative;
  width: 100%;
  height: calc(var(--anes-card-h) + 32px);
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}

.anesthesia-stage.is-dragging {
  cursor: grabbing;
}

.anesthesia-stage.is-dragging .anesthesia-card {
  transition: none;
}

.anesthesia-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.anesthesia-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--anes-card-w);
  height: var(--anes-card-h);
  margin: calc(var(--anes-card-h) / -2) 0 0 calc(var(--anes-card-w) / -2);
  border-radius: 1.75rem;
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-shadow: 0 16px 36px rgba(15, 114, 186, 0.2);
  transition:
    transform 0.6s cubic-bezier(0.22, 0.8, 0.28, 1),
    opacity 0.45s ease,
    box-shadow 0.45s ease,
    filter 0.45s ease;
  will-change: transform, opacity;
  pointer-events: auto;
}

.anesthesia-card.is-active {
  box-shadow: 0 24px 52px rgba(15, 114, 186, 0.34);
}

.anesthesia-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.anesthesia-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 114, 186, 0.88) 0%,
    rgba(15, 114, 186, 0.35) 45%,
    rgba(15, 114, 186, 0.08) 100%
  );
}

.anesthesia-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1.5rem;
  color: #fff;
}

.anesthesia-card-step {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.anesthesia-card-title {
  margin-top: 0.3rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.anesthesia-card-desc {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.95;
}

.anesthesia-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.anesthesia-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.anesthesia-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #9CA3AF;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.anesthesia-dot.is-active {
  width: 1.5rem;
  background: #0F72BA;
}

@media (min-width: 768px) {
  .anesthesia-carousel {
    --anes-card-w: 300px;
    --anes-card-h: 300px;
    --anes-gap: 20px;
    --anes-rotate: 40deg;
    --anes-depth: 150px;
    --anes-inset: 100px;
  }

  .anesthesia-stage {
    height: calc(var(--anes-card-h) + 40px);
  }

  .anesthesia-card {
    border-radius: 2rem;
  }

  .anesthesia-card-body {
    padding: 1.75rem;
  }

  .anesthesia-card-title {
    font-size: 1.625rem;
  }

  .anesthesia-card-desc {
    font-size: 0.95rem;
  }
}

@media (min-width: 1024px) {
  .anesthesia-carousel {
    /* 참고 이미지: 카드 약 340×340, gap 24px, 한 화면에 4~5장 */
    --anes-card-w: 340px;
    --anes-card-h: 340px;
    --anes-gap: 24px;
    --anes-rotate: 38deg;
    --anes-depth: 160px;
    --anes-inset: 110px;
  }

  .anesthesia-stage {
    height: calc(var(--anes-card-h) + 48px);
    perspective: 1400px;
  }

  .anesthesia-controls {
    margin-top: 2.5rem;
  }
}

@media (min-width: 1440px) {
  .anesthesia-carousel {
    --anes-card-w: 380px;
    --anes-card-h: 380px;
    --anes-gap: 28px;
    --anes-rotate: 36deg;
    --anes-depth: 180px;
    --anes-inset: 120px;
  }
}

@media (min-width: 1800px) {
  .anesthesia-carousel {
    --anes-card-w: 420px;
    --anes-card-h: 420px;
    --anes-gap: 32px;
    --anes-rotate: 34deg;
    --anes-depth: 200px;
    --anes-inset: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anesthesia-card {
    transition-duration: 0.01ms;
  }
}
