/* DS form element reset for Tailwind preflight-OFF environments.
   Removes browser default button/input border, outline, background, appearance.
   font-family: inherit — preflight OFF 환경에서 native button/input 이 UA 기본 폰트로
   떨어지는 것을 막아 본문(Pretendard) 을 상속하게 한다(Tailwind preflight 동일 처방).
   font-size/weight 는 건드리지 않아 레거시 영향 최소 — 타이포 유틸이 크기를 지정한다.
   Element selector specificity is low so Tailwind utilities and MUI classes override. */
button,
input,
textarea,
select {
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  font-family: inherit;
}

/* Text element margin reset — preflight OFF 환경에서 브라우저 기본 margin 제거.
   Tailwind utility(my-*, mt-*, mb-*)로 명시 지정해서 사용. */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

/* 클릭 가능한 요소 — 포인터, 비활성 — not-allowed.
   @layer base 에 둬서 컴포넌트가 명시한 cursor-* 유틸이 항상 이긴다 — 유틸이 레이어 밖
   (`@import 'tailwindcss/utilities'`)이든 utilities 레이어(`@import 'tailwindcss'`)이든 base 보다 뒤다.
   이 파일의 다른 규칙처럼 레이어 밖에 두면 cursor-default 등 유틸 지정을 덮어버린다. */
@layer base {
  :where(
      button,
      a[href],
      summary,
      select,
      label[for],
      input[type='checkbox'],
      input[type='radio'],
      input[type='file'],
      input[type='range'],
      [role='button'],
      [role='tab'],
      [role='menuitem'],
      [role='menuitemcheckbox'],
      [role='menuitemradio'],
      [role='option'],
      [role='switch'],
      [role='checkbox'],
      [role='radio'],
      [role='link']
    ) {
    cursor: pointer;
  }

  :where(:disabled, [aria-disabled='true'], [data-disabled]) {
    cursor: not-allowed;
  }
}
