/* ============================================================
   Modern CSS Reset
   ============================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── 헤딩 ─── */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--color-text-dark);
    word-break: keep-all;
}

/* ─── 링크 ─── */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ─── 리스트 ─── */
ul, ol {
    list-style: none;
}

/* ─── 이미지 & 미디어 ─── */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ─── 폼 요소 ─── */
input, button, textarea, select {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ─── 테이블 ─── */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* ─── 기타 ─── */
p {
    word-break: keep-all;
    overflow-wrap: break-word;
}

strong, b {
    font-weight: var(--fw-bold);
}

hr {
    border: none;
    border-top: 1px solid var(--color-gray-200);
    margin: var(--sp-8) 0;
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ─── 스크롤바 커스텀 ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}
