/* =============================================================================
   리셋 + 모바일 필수 기술 규칙 (개발지시서 §2.3).
   시각 스타일은 여기 두지 않는다 — tokens.css(값) / components.css(컴포넌트 모양).
   ============================================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: contain; /* 당겨서 새로고침 오작동 방지 */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-body);
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol {
  margin: 0;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

a {
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

#app {
  min-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 상단/하단 고정 요소의 세이프에어리어는 각 컴포넌트가 아래 유틸리티로 처리한다 */
.rqw-safe-top    { padding-top: env(safe-area-inset-top); }
.rqw-safe-bottom { padding-bottom: env(safe-area-inset-bottom); }

.rqw-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;
}

/* 숫자는 항상 tabular-nums — 카운트업/타이머 애니메이션 시 자릿수 흔들림 방지 */
.rqw-num {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
