/* base.css — 리셋 + 문서 기본. 구 Tailwind preflight 중 실제로 쓰이던 것만. */

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--border);
}

* {
  margin: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  /* dvh(dynamic viewport height) — 100vh 는 iOS Safari 주소창 영역과 충돌해
     입력 영역이 가려지는 케이스가 있다(구버전 layout.tsx 주석 참조). */
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
textarea {
  font: inherit;
  color: inherit;
  background: none;
}

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

ul,
ol {
  list-style: none;
  padding: 0;
}

svg {
  display: block;
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* 스크린리더 전용 */
.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;
}

/* 진행 중 spinner — 구 lucide Loader2 의 animate-spin */
.spin {
  animation: spin 1s linear infinite;
}
.accent {
  color: var(--primary);
}
.muted {
  color: var(--muted-foreground);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 3s; }
  * { scroll-behavior: auto !important; }
}
