/* 1. 모든 요소의 박스 크기 계산 방식 통일 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. 기본 여백 제거 및 모바일 텍스트 자동 확대 방지 */
* {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: none;
}

/* 3. HTML/Body 기본 구조 */
html {
  block-size: 100%;
  color-scheme: light dark;
}

body {
  min-block-size: 100svh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 4. 미디어 요소의 크기 및 비율 초기화 */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 5. 폼 컨트롤의 글꼴 상속 */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

/* 6. 텍스트 줄바꿈 */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* 7. 앵커 이동 및 모션 감소 설정 */
:target {
  scroll-margin-block: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
