/* 전역: 모바일 풀반응형 보조 + 스크롤 바운스 제거 + 로딩 UI */

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

body {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  min-height: 100%;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* iOS 입력 시 자동 확대 방지 */
input,
select,
textarea,
button {
  font-size: 16px;
}

@media (min-width: 768px) {
  input,
  select,
  textarea,
  button {
    font-size: inherit;
  }
}

.main,
.sidebar,
.sp-body,
.jobs-main,
.admin-main {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── 전역 로딩 오버레이 ── */
.app-loading {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.app-loading[hidden] {
  display: none !important;
}

.app-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(91, 91, 214, 0.2);
  border-top-color: #5b5bd6;
  border-radius: 50%;
  animation: app-spin 0.7s linear infinite;
}

.app-loading-msg {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  font-family: Pretendard, -apple-system, sans-serif;
}

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

/* ── 뷰 스켈레톤 ── */
.app-skeleton-wrap {
  padding: 4px 0 16px;
}

.app-skeleton-line {
  height: 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  background: linear-gradient(
    90deg,
    #f3f4f6 0%,
    #e5e7eb 50%,
    #f3f4f6 100%
  );
  background-size: 200% 100%;
  animation: app-shimmer 1.2s ease-in-out infinite;
}

.app-skeleton-line.w60 {
  width: 60%;
}

.app-skeleton-line.w40 {
  width: 40%;
}

.app-skeleton-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

@keyframes app-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 모바일 터치 영역 */
@media (max-width: 767px) {
  .btn,
  .nav-btn,
  .top-logout {
    min-height: 44px;
  }
}
