:root {
  --site-max: 1024px;
}

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

body {
  min-width: 0;
  overflow-x: hidden;
}

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

/* 광고/임베드 가로넘침 보호 */
.ad-wrap,
[class*="coupang"],
iframe {
  max-width: 100%;
  overflow: hidden;
}
.ad-wrap,
[class*="coupang"],
iframe {
  width: 100%;
}

/* 전체 폼 요소 */
input,
select,
textarea,
button {
  max-width: 100%;
}

/* flex / grid 컨테이너 기본 보호 */
.flex,
.grid {
  min-width: 0;
}
[class*="grid-cols"] > * {
  min-width: 0;
}

/* 사이드바 모바일 */
@media (max-width: 767px) {
  aside[class*="w-[280px]"] {
    width: 100% !important;
    position: static !important;
  }
}

/* 모바일 내비 선택 */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 46;
  width: min(78vw, 320px);
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  padding: 80px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-nav-panel.open {
  transform: translateX(0);
}

.mobile-nav-panel a {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}
.mobile-nav-panel a:hover {
  background: #f1f5f9;
}
.mobile-nav-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
@media (max-width: 767px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* 헤더 보정 */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(14px);
}

/* 쿠팡 등 외부 고정너치 요소 보정 */
.ad-wrap {
  display: flow-root;
  margin-left: auto;
  margin-right: auto;
}

/* 검색바 */
.search-bar,
.search-wrap {
  max-width: 100%;
}
.search-bar form,
.search-wrap form {
  flex-wrap: wrap;
}
.search-bar input,
.search-wrap input {
  min-width: 0;
}
.search-bar button[type="submit"],
.search-wrap button[type="submit"] {
  white-space: nowrap;
}

/* 테이블 */
.overflow-auto {
  -webkit-overflow-scrolling: touch;
}

/* 카드 이미지 하단 텍스트 겹침 방지 */
.card-body {
  min-height: 0;
}

/* 모바일에서 제목/긴문장 줄바꿈 */
h1,
h2,
h3,
.break-keep {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
