/* ============================================================
   멍멍로그 (theme/25) - 보조 CSS
   Tailwind utility 중심 / 여기는 예외 보조만 (full-bleed, overflow,
   Swiper 보정, line-clamp, 다크모드, CDN 한계 보정)
   ============================================================ */

:root { --brand: #FF6B35; }

/* 전역 박스/오버플로 안전 (280/320 가로 스크롤 방지) */
* { min-width: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* 부드러운 스크롤 + sticky 헤더 앵커 오프셋 */
html { scroll-behavior: smooth; }
section[id], div[id] { scroll-margin-top: 76px; }

/* 본문 하단 모바일 탭바 높이만큼 여백 확보 */
@media (max-width: 1023px) {
  body { padding-bottom: 60px; }
}

/* line-clamp (Tailwind CDN 누락 대비 보정) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Swiper 슬라이드 display:flex 강제 (세로 가운데 정렬 보정) */
.noticeTicker .swiper-slide { display: flex !important; }

/* 헤더 스크롤 시 그림자 */
#siteHeader.scrolled { box-shadow: 0 4px 20px -8px rgba(0,0,0,.15); }

/* ===== 다크 모드 ===== */
body.dark { background: #121418; color: #E5E7EB; }
body.dark #siteHeader { background: rgba(24,26,31,.9); border-color: #262a31; }
body.dark header nav a:not(.bg-\[\#FFEDE4\]) { color: #cbd0d8; }
body.dark #popular,
body.dark #notice .bg-white,
body.dark .diary-card,
body.dark footer { background: #181a1f !important; border-color: #262a31 !important; }
body.dark #popular { border-top-color:#262a31; border-bottom-color:#262a31; }
body.dark .border-gray-100,
body.dark .border-gray-50,
body.dark .divide-gray-100 > * { border-color: #262a31 !important; }
body.dark h2, body.dark h3 { color: #F3F4F6 !important; }
body.dark .text-\[\#1F2937\] { color: #F3F4F6 !important; }
body.dark .text-gray-500,
body.dark .text-gray-600 { color: #9aa1ad !important; }
body.dark a.hover\:bg-\[\#FFF9F6\]:hover,
body.dark .hover\:bg-\[\#FFF9F6\]:hover { background: #20242b !important; }
body.dark #bottomNav { background:#181a1f; border-color:#262a31; }
body.dark .bg-\[\#F8F9FB\] { background:#121418 !important; }
body.dark #familySite { background:#20242b !important; border-color:#262a31 !important; color:#cbd0d8; }
body.dark #eventPopup > div { background:#181a1f; }
body.dark #eventPopup .bg-gray-50 { background:#20242b !important; }

/* 모션 줄이기 사용자 배려 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
