/* index.html PC/메인 밀도·연락처·중고거래 레이아웃
   compat-ios6 float 규칙보다 뒤에 로드되어 PC 여백 문제를 덮어쓴다. */

/* 모바일 헤더: compat-ios6 clearfix 가상 요소(:after)가 flex item으로 취급되어 햄버거 버튼이 중앙으로 밀리는 현상 방지 */
@supports (display: flex) {
  header .h-16:after,
  header .h-16:before,
  .site-header .header-bar:after,
  .site-header .header-bar:before,
  header .header-bar:after,
  header .header-bar:before {
    content: none !important;
    display: none !important;
  }

  header .h-16 > .lg\:hidden,
  .site-header .header-bar > .lg\:hidden,
  header .header-bar > div:last-child {
    float: none !important;
    height: auto !important;
  }

  #mobile-menu-btn {
    margin-top: 0 !important;
  }
}

/* 메인 히어로 배너: Tailwind CDN 지연/폴백 시에도 항상 딥그린 배경 및 흰색 글씨 보장 */
section.hero-banner,
section[class*="from-emerald"] {
  background-color: #022c22 !important;
  background-image: linear-gradient(135deg, #022c22, #064e3b, #042f2e) !important;
  color: #ffffff !important;
}

section.hero-banner h2,
section[class*="from-emerald"] h2 {
  color: #ffffff !important;
}

section.hero-banner p,
section[class*="from-emerald"] p {
  color: #d1fae5 !important;
}

/* 사이트 비전 바: 일관된 에메랄드 톤온톤 배경 */
.vision-bar,
div[class*="from-emerald-50"] {
  background-color: #ecfdf5 !important;
  background-image: linear-gradient(to right, rgba(236,253,245,0.95), rgba(240,253,250,0.8), rgba(236,253,245,0.95)) !important;
  border-bottom: 1px solid #a7f3d0 !important;
}

/* 대시보드 카드 테두리 구분 강화: 얇은 초록색 border 적용 */
#main-left-column > div,
#main-left-column > section,
#main-right-column > div,
#main-right-column > section {
  border: 1px solid rgba(167, 243, 208, 0.95) !important; /* emerald-200 */
}

#main-left-column > div:hover,
#main-left-column > section:hover,
#main-right-column > div:hover,
#main-right-column > section:hover {
  border-color: #6ee7b7 !important; /* emerald-300 */
}

/* 메인 그리드: 모던 브라우저는 네이티브 grid 유지 */
@supports (display: grid) {
  main.index-main.grid {
    display: grid !important;
  }

  #flea-preview-container,
  #index-chat-rooms-container,
  #index-topic-list-container,
  .contact-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.75rem !important;
  }

  @media (min-width: 640px) {
    #flea-preview-container,
    #index-chat-rooms-container,
    #index-topic-list-container,
    .contact-grid {
      grid-template-columns: 1fr 1fr !important;
    }
  }

  #flea-preview-container > a,
  #flea-preview-container > a:first-child,
  #flea-preview-container > a:last-child,
  #flea-preview-container > a:nth-child(2n),
  #flea-preview-container > div,
  #flea-preview-container > div:first-child,
  #flea-preview-container > div:last-child,
  #index-chat-rooms-container > a,
  #index-chat-rooms-container > a:first-child,
  #index-chat-rooms-container > a:last-child,
  #index-chat-rooms-container > a:nth-child(odd),
  #index-chat-rooms-container > a:nth-child(even),
  #index-chat-rooms-container > a:nth-child(2n),
  #index-chat-rooms-container > a:nth-child(2n+1),
  #index-chat-rooms-container > div,
  #index-topic-list-container > a,
  #index-topic-list-container > a:first-child,
  #index-topic-list-container > a:last-child,
  #index-topic-list-container > a:nth-child(odd),
  #index-topic-list-container > a:nth-child(even),
  #index-topic-list-container > a:nth-child(2n),
  #index-topic-list-container > a:nth-child(2n+1),
  #index-topic-list-container > div,
  .contact-grid > div,
  .contact-grid > div:first-child,
  .contact-grid > div:last-child,
  .contact-grid > div:nth-child(odd),
  .contact-grid > div:nth-child(even) {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  #index-chat-rooms-container > a,
  #index-chat-rooms-container > a:nth-child(odd),
  #index-chat-rooms-container > a:nth-child(even),
  #index-chat-rooms-container > a:nth-child(2n),
  #index-chat-rooms-container > a:nth-child(2n+1) {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -webkit-flex-direction: row !important;
    flex-direction: row !important;
    -webkit-box-align: center !important;
    -webkit-align-items: center !important;
    align-items: center !important;
  }
}

/* 중고거래 카드 */
#flea-preview-container > a.flea-preview-card {
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem !important;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  min-height: 0 !important;
  height: auto !important;
  line-height: normal !important;
  white-space: normal !important;
  overflow: visible !important;
  text-align: left !important;
}

#flea-preview-container > a.flea-preview-card:hover {
  background: #f3f4f6;
}

#flea-preview-container > a.flea-preview-card img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.375rem;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

#flea-preview-container > a.flea-preview-card .flea-preview-body {
  min-width: 0;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

#flea-preview-container > a.flea-daangn-card {
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center !important;
  padding: 0.75rem !important;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #064e3b;
  min-height: 5.5rem !important;
  height: auto !important;
  line-height: normal !important;
  white-space: normal !important;
  transition: all 0.15s ease-in-out;
}

#flea-preview-container > a.flea-daangn-card:hover {
  background: #dcfce7;
  border-color: #bbf7d0;
}

/* 연락처 리스트 — 라벨/번호 한 줄 밀도 */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list > li {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f3f4f6;
  height: auto !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}

.contact-list > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-list > li:first-child {
  padding-top: 0;
}

.contact-label {
  font-weight: 700;
  color: #374151;
  font-size: 0.875rem;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.contact-value {
  font-size: 0.875rem;
  color: #4b5563;
  white-space: nowrap;
}

.contact-value a {
  color: #2563eb !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  display: inline !important;
  width: auto !important;
  height: auto !important;
  line-height: inherit !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.contact-value a:hover {
  text-decoration: underline !important;
}

.contact-sep {
  color: #d1d5db;
  margin: 0 0.35rem;
}

.contact-fax {
  color: #6b7280;
}

@media (min-width: 640px) {
  .contact-list > li {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 0.75rem;
  }
}

/* ── 모던 사파리 Sticky 헤더 및 오버플로우 방어 ── */
@supports (position: sticky) or (position: -webkit-sticky) {
  html, body {
    overflow-x: clip !important;
  }
}

/* ── SVG 및 아이콘 규격 방어 (Tailwind 미동작 및 사파리 레이아웃 깨짐 방지) ── */
svg {
  max-width: 100%;
}

.w-3\.5, svg.w-3\.5 { width: 0.875rem !important; max-width: 0.875rem !important; }
.h-3\.5, svg.h-3\.5 { height: 0.875rem !important; max-height: 0.875rem !important; }
.w-4, svg.w-4 { width: 1rem !important; max-width: 1rem !important; }
.h-4, svg.h-4 { height: 1rem !important; max-height: 1rem !important; }
.w-5, svg.w-5 { width: 1.25rem !important; max-width: 1.25rem !important; }
.h-5, svg.h-5 { height: 1.25rem !important; max-height: 1.25rem !important; }
.w-6, svg.w-6 { width: 1.5rem !important; max-width: 1.5rem !important; }
.h-6, svg.h-6 { height: 1.5rem !important; max-height: 1.5rem !important; }
.w-7 { width: 1.75rem !important; max-width: 1.75rem !important; }
.h-7 { height: 1.75rem !important; max-height: 1.75rem !important; }
.w-8, svg.w-8 { width: 2rem !important; max-width: 2rem !important; }
.h-8, svg.h-8 { height: 2rem !important; max-height: 2rem !important; }
.w-9 { width: 2.25rem !important; max-width: 2.25rem !important; }
.h-9 { height: 2.25rem !important; max-height: 2.25rem !important; }
.w-10 { width: 2.5rem !important; max-width: 2.5rem !important; }
.h-10 { height: 2.5rem !important; max-height: 2.5rem !important; }

/* 찐주민 추천 생활정보 아이콘 박스 및 내부 SVG 강제 규격화 */
.w-7.h-7 {
  width: 1.75rem !important;
  height: 1.75rem !important;
  min-width: 1.75rem !important;
  min-height: 1.75rem !important;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-align: center !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  -webkit-box-pack: center !important;
  -webkit-justify-content: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  -webkit-flex-shrink: 0 !important;
}

.w-7.h-7 > svg,
.w-7 > svg {
  width: 0.875rem !important;
  height: 0.875rem !important;
  min-width: 0.875rem !important;
  min-height: 0.875rem !important;
  max-width: 0.875rem !important;
  max-height: 0.875rem !important;
  display: block !important;
  flex-shrink: 0 !important;
  -webkit-flex-shrink: 0 !important;
}

.w-8.h-8 {
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  min-height: 2rem !important;
  flex-shrink: 0 !important;
}

.w-9.h-9 {
  width: 2.25rem !important;
  height: 2.25rem !important;
  min-width: 2.25rem !important;
  min-height: 2.25rem !important;
  flex-shrink: 0 !important;
}

.w-10.h-10 {
  width: 2.5rem !important;
  height: 2.5rem !important;
  min-width: 2.5rem !important;
  min-height: 2.5rem !important;
  flex-shrink: 0 !important;
}

/* 층간소음 허용시간 텍스트 줄바꿈 방지 */
.break-keep {
  word-break: keep-all !important;
}
.whitespace-nowrap {
  white-space: nowrap !important;
}

/* 찐주민 추천 생활정보 항목 사파리 철통 방어 */
.tips-item-card,
a.tips-item-card,
button.tips-item-card {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box-direction: normal !important;
  -webkit-flex-direction: row !important;
  flex-direction: row !important;
  -webkit-box-align: center !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  -webkit-box-pack: justify !important;
  -webkit-justify-content: space-between !important;
  justify-content: space-between !important;
  padding: 0.75rem !important;
  min-height: 3.5rem !important;
  height: auto !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  width: 100% !important;
}

.tips-item-left {
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box-direction: normal !important;
  -webkit-flex-direction: row !important;
  flex-direction: row !important;
  -webkit-box-align: center !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  -webkit-box-flex: 1 !important;
  -webkit-flex: 1 1 0% !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  gap: 0.625rem !important;
}

.tips-item-icon {
  width: 1.75rem !important;
  height: 1.75rem !important;
  min-width: 1.75rem !important;
  min-height: 1.75rem !important;
  max-width: 1.75rem !important;
  max-height: 1.75rem !important;
  -webkit-flex-shrink: 0 !important;
  flex-shrink: 0 !important;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-align: center !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  -webkit-box-pack: center !important;
  -webkit-justify-content: center !important;
  justify-content: center !important;
  border-radius: 0.5rem !important;
  margin-right: 0.625rem !important;
}

.tips-item-icon > svg {
  width: 0.875rem !important;
  height: 0.875rem !important;
  min-width: 0.875rem !important;
  min-height: 0.875rem !important;
  max-width: 0.875rem !important;
  max-height: 0.875rem !important;
  display: block !important;
  -webkit-flex-shrink: 0 !important;
  flex-shrink: 0 !important;
}

.tips-item-text {
  -webkit-box-flex: 1 !important;
  -webkit-flex: 1 1 0% !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  display: block !important;
  text-align: left !important;
}

.tips-item-text span {
  display: block !important;
  white-space: normal !important;
  word-break: keep-all !important;
}

.tips-item-title {
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  margin-bottom: 0.15rem !important;
}

.tips-item-sub {
  font-size: 0.6875rem !important;
  color: #64748b !important;
  line-height: 1.25 !important;
}

.tips-item-arrow,
.tips-item-badge {
  -webkit-flex-shrink: 0 !important;
  flex-shrink: 0 !important;
  margin-left: 0.5rem !important;
}


