/* ============================================================
   base.css — 브라우저 리셋 + html/body 기본값
   ⚠️ tokens.css 이후 로드 필수
   ============================================================ */

/* S3.44 DEF-S344-13 — Google Fonts 안 manus.im 표준 폰트 import
 * 외부 자료: https://manus.im/brand (Libre Baskerville + DM Sans)
 *           https://fonts.google.com/specimen/Libre+Baskerville
 *           https://fonts.google.com/specimen/DM+Sans */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Noto+Sans+KR:wght@400;500;600;700&family=Noto+Serif+KR:wght@400;700&display=swap');

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--nv-font);
  font-size: var(--nv-text-base);
  line-height: var(--nv-lh-normal);
  color: var(--nv-text);
  background-color: var(--nv-bg);
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img, svg, video { display: block; max-width: 100%; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: var(--nv-lh-tight); font-family: var(--nv-font-serif); font-weight: var(--nv-fw-bold); }

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--nv-border); border-radius: var(--nv-r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--nv-text-3); }

/* ── 포커스 접근성 ── */
:focus-visible { outline: 2px solid var(--nv-primary); outline-offset: 2px; }

/* ── Safe Area ── */
.safe-top    { padding-top:    env(safe-area-inset-top, 0px); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 20px); }
.safe-left   { padding-left:   env(safe-area-inset-left, 0px); }
.safe-right  { padding-right:  env(safe-area-inset-right, 0px); }

/* ── 유틸리티 ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.hidden { display: none !important; }

/* ── 스켈레톤 keyframe ── */
@keyframes nv-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── 스피너 keyframe ── */
@keyframes nv-spin { to { transform: rotate(360deg); } }

/* ── 토스트 keyframe ── */
@keyframes nv-toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes nv-toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(16px); }
}
