/* ============================================================
   utilities.css — Tailwind Play CDN 대체용 정적 유틸리티.
   실제로 쓰는 클래스만 손으로 구현 (런타임 MutationObserver 비용 제거).
   ============================================================ */

/* ── 최소 리셋 (Tailwind Preflight 대체분) ── */
h1, h2, h3, h4, h5, h6, p { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
button, input, select, textarea { font-family: inherit; font-size: 100%; line-height: inherit; color: inherit; }
button { margin: 0; }

/* ── display / position ── */
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-x-auto { overflow-x: auto; }

/* ── flex ── */
.flex-wrap { flex-wrap: wrap; }
.items-baseline { align-items: baseline; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }

/* ── grid ── */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }

/* ── gap ── */
.gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; } .gap-6 { gap: 1.5rem; }
.gap-x-4 { column-gap: 1rem; } .gap-x-5 { column-gap: 1.25rem; }
.gap-y-1 { row-gap: .25rem; } .gap-y-1\.5 { row-gap: .375rem; }

/* ── margin ── */
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-5 { margin-bottom: 1.25rem; } .mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; } .mb-10 { margin-bottom: 2.5rem; } .mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; } .mt-10 { margin-top: 2.5rem; } .mt-14 { margin-top: 3.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── padding ── */
.p-1\.5 { padding: .375rem; } .p-2 { padding: .5rem; } .p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; } .p-8 { padding: 2rem; } .p-10 { padding: 2.5rem; }
.pb-4 { padding-bottom: 1rem; } .pt-4 { padding-top: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* ── width ── */
.w-full { width: 100%; }
.max-w-5xl { max-width: 64rem; }
.max-w-none { max-width: none; }

/* ── text ── */
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.tracking-wide { letter-spacing: .025em; }
.tracking-widest { letter-spacing: .1em; }

/* ── misc ── */
.cursor-pointer { cursor: pointer; }
.whitespace-nowrap { white-space: nowrap; }
.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;
}

/* ── 반응형 (sm=640px, md=768px) ── */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:col-span-3 { grid-column: span 3 / span 3; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
