/**
 * ============================================================
 * MoneyBull Calculator
 * CSS Reset (Refined Ver.)
 * ============================================================
 */

/* ============================================================
   Box Sizing
============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================================
   Document & Body Settings
============================================================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-family-base);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Typography & Elements Reset
============================================================ */
h1, h2, h3, h4, h5, h6, p, figure {
    margin: 0;
    padding: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ============================================================
   Media Embeds
============================================================ */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ============================================================
   Form & Input Field Tuning (핀테크 화면 방어용)
============================================================ */
button, input, textarea, select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

button {
    cursor: pointer;
    user-select: none;
}

input, textarea {
    outline: none;
    appearance: none;
    -webkit-appearance: none; /* 모바일 사파리 기본 입체감 제거 */
}

/* 크롬/사파리/파이어폭스 숫자 인풋 기본 화살표 스핀 UI 제거 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

/* ============================================================
   Accessibility & Utilities
============================================================ */
/* 키보드 접근성 타겟팅 시에만 안전 링 노출 (인풋 요소는 컴포넌트 내부 스펙이 우선순위) */
button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}