/* 박스 모델 초기화 */
html {
	box-sizing: border-box;
	color: #222;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.5;
	background-color: #fff;
	height: 100%;
	min-height: 100vh;
	min-height: 100dvh; /* iOS Safari 100vh 버그 대응 */
	/* 모바일 텍스트 크기 조정 방지 */
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	/* 부드러운 스크롤 */
	scroll-behavior: smooth;
	/* 폰트 렌더링 최적화 */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
}

/* 기본 텍스트 요소 초기화 */
body {
	height: 100%;
	min-height: 100vh;
	min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6,
p, span, strong, em, b, i,
blockquote, pre, code,
ul, ol, li,
a, img,
button, input, textarea, select,
table, th, td,
article, aside, section, nav, header, footer, figure, figcaption {
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;
	color: inherit;
	vertical-align: baseline;
}

/* 목록 기호 제거 */
ul, ol {
	list-style: none;
}

/* 링크 스타일 제거 */
a {
	text-decoration: none;
	color: inherit;
}

/* 이미지 및 미디어 스타일 */
img, audio, video {
	max-width: 100%;
	height: auto;
	display: block;
}

/* 인라인 요소 정리 */
sub, sup {
	vertical-align: baseline;
	position: relative;
	font-size: 0.75em;
}

sup { 
	top: -0.5em; 
}

sub { 
	bottom: -0.25em; 
}

/* 버튼 및 폼 요소 초기화 */
button,
input,
textarea,
select {
	font: inherit;
	color: inherit;
	background: none;
	border: none;
}

/* 버튼 스타일 통일 */
button {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

/* input 타입별 정리 */
input[type="search"] {
	-webkit-appearance: none;
	appearance: none;
}

/* 접근성을 고려한 포커스 스타일 */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
}

/* 마우스 클릭시에는 outline 제거 */
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
	outline: none;
}

/* 텍스트 선택 스타일 */
::selection {
	background-color: #b3d4fc;
	text-shadow: none;
}

/* hidden 속성 강화 */
[hidden] {
	display: none !important;
}

/* 테이블 */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* 시멘틱 태그 추가 초기화 */
mark {
	background-color: #fff3b0;
	color: #222;
}

abbr[title] {
	border-bottom: 1px dotted;
	cursor: help;
}

pre,
code {
	font-family: monospace;
}

fieldset {
	border: none;
	margin: 0;
	padding: 0;
}

legend {
	padding: 0;
}

/* 접근성 개선 - 애니메이션 선호도 고려 */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* 스크린 리더 전용 텍스트 */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}