/* ============================================
   헤이에어컨청소 - 가독성 우선 글로벌 스타일
   ============================================ */

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: 'kern' 1;
}

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.015em;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 모든 인터랙티브 요소 최소 터치 영역 보장 */
button,
a,
input[type="submit"] {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* 단, 본문 내 인라인 a 태그는 제외 */
p a,
span a,
li a,
summary a {
  display: inline;
  min-height: auto;
}

/* 헤딩 - 자간 살짝 좁히고 줄간격 타이트 */
h1, h2, h3 {
  letter-spacing: -0.025em;
  line-height: 1.3;
}

/* 본문 line-height 보장 */
p {
  line-height: 1.6;
}

/* iOS safe area */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* 입력 폼 - iOS 줌인 방지(16px+) + 패딩 적절히 */
input, textarea, select, button {
  font-family: inherit;
  font-size: 16px; /* iOS Safari 자동 확대 방지 */
  letter-spacing: -0.01em;
}

/* placeholder 색상 부드럽게 */
::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* ============== 카드/인터랙션 ============== */
@media (hover: hover) {
  .card-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: all 0.15s ease;
  }
}

/* 부드러운 등장 */
.fade-in {
  animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 로딩 펄스 */
.pulse-soft {
  animation: pulseSoft 2s ease-in-out infinite;
}
@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============== 토스트 ============== */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  animation: toastIn 0.2s ease-out;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  letter-spacing: -0.01em;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ============== 유틸 ============== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* details 마커 숨김 (Safari 호환) */
details > summary {
  list-style: none;
  cursor: pointer;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::after {
  content: '\f078'; /* chevron-down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  float: right;
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s;
}
details[open] > summary::after {
  transform: rotate(180deg);
}

/* 본문 텍스트 줄바꿈 자연스럽게 */
.text-balance {
  text-wrap: balance;
}
.text-pretty {
  text-wrap: pretty;
}

/* 줄 자르기 (라인 클램프) */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 강조 표시 - 가독성 좋은 하이라이트 */
.highlight {
  background: linear-gradient(180deg, transparent 60%, #fde68a 60%);
  padding: 0 2px;
}

/* 가독성 카드 (구분선 효과) */
.divide-soft > * + * {
  border-top: 1px solid #f1f5f9;
}
