/**
 * 공통 스타일 — 리셋 및 베이스 타이포그래피
 */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    /* 한글 어절 단위 줄바꿈 — 단어 중간에서 끊기지 않도록 */
    word-break: keep-all;
    overflow-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;      /* width/height 속성이 있어도 비율을 지킨다 (카카오톡 옛 CSS 캐시 사고 2026-09-04) */
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

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

:focus-visible {
    outline: 2px solid var(--signal-deep);
    outline-offset: 3px;
    border-radius: 2px;
}

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

::-webkit-scrollbar-track {
    background: var(--paper);
}

::-webkit-scrollbar-thumb {
    background: var(--line-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hive);
}

@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;
    }
}
