/*

## 기본 css 규칙
1. PREFER CSS NESTING
2. px 단위 선호
3. 모든 요소에는 기본적으로 box-sizing: border-box가 설정 되어 있는 상태

## 테이블 사용시
1. 테이블 사용시에는 td과 th에서 border 사용 (이미 border-collapse: collapse; 설정 되어 있음)
2. td와 th에는 padding 넣지 말기 (이미 padding: 0; 설정 되어 있음)
3. 높이는 tr로 설정 (일반적으로 40px 선호)
4. table의 tr에 form을 넣어야 할때는 form을 위에 따로 넣고 form="target_form_id" 속성을 추가하여 연결
5. 각 칸의 너비 조절시 colgroup 적극 사용
*/


/* 1. Box-sizing 전역 설정 */
html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    /* iOS 가로 모드 시 폰트 크기 급증 방지 */
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* 2. 모든 요소의 마진과 패딩 초기화 */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul,
li,
figure,
figcaption,
blockquote,
dl,
dd {
    margin: 0;
    padding: 0;
}

/* 3. HTML5 태그 설정 */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

/* 4. 바디 설정 */
body {
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* 폰트 매끄럽게 */
    text-rendering: optimizeLegibility;
}

/* 5. 리스트 스타일 제거 */
ol,
ul {
    list-style: none;
}

/* 6. 링크 스타일 초기화 */
a {
    text-decoration: none;
    color: inherit;
}

/* 7. 이미지 및 미디어 설정 */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 8. 폼 요소 초기화 */
input,
button,
textarea,
select {
    font: inherit;
    /* 부모 폰트 상속 */
    margin: 0;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* 9. 테이블 초기화 */
table {
    border-collapse: collapse;
    border-spacing: 0;
}