/* 데스크탑: v3 요소 숨김 (기본) */
.v3-hero-live, .v3-hero-search, .v3-feed,
.mobile-quickbar, .mobile-quickbar-hint { display: none !important; }

/* ─────────────────────────────────────────
   모바일 홈 v3 시안 정밀 매칭 (2026-10-08)
   v3 mockup과 픽셀 단위로 일치하도록 작성
   ───────────────────────────────────────── */
@media (max-width: 900px) {
  /* 고정 헤더(메뉴줄 포함) 높이만큼 body 여백 확보 */
  body { padding-top: 112px !important; }
  /* 바디 배경 */
  body { background: #F5F3EE !important; }

  /* ── 히어로: v3 다크 그라데이션 ── */
  .hero {
    background: linear-gradient(135deg, #0C1710 0%, #1B4332 100%) !important;
    color: #fff !important;
    padding: 28px 20px 24px !important;
    border-radius: 0 !important;
  }
  .hero-badge {
    display: inline-block !important;
    background: rgba(255,255,255,0.15) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    margin-bottom: 10px !important;
    color: #fff !important;
  }
  .hero-mobile-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #fff !important;
    margin: 0 0 0 0 !important;
  }
  @keyframes v3-wiggle {
    0%, 100% { transform: rotate(0deg); }
    5% { transform: rotate(-2.5deg); }
    10% { transform: rotate(2.5deg); }
    15% { transform: rotate(-2deg); }
    20% { transform: rotate(2deg); }
    25% { transform: rotate(-1deg); }
    30% { transform: rotate(0deg); }
  }
  .hero-mobile-title .wiggle {
    display: inline-block !important;
    animation: v3-wiggle 2.5s ease-in-out infinite !important;
    transform-origin: center !important;
  }
  /* 시안에 없는 요소 숨김 */
  .hero-mobile-sub, .hero .hero-buttons, .hero-visual,
  .hero-desktop-title, .hero-desktop-sub { display: none !important; }
  .hero-mobile-title { display: block !important; }
  /* 데스크탑 내비게이션 숨김 (모바일 바로가기 바와 중복 방지) */
  #top-nav { display: none !important; }

  /* 라이브 칩 */
  .v3-hero-live {
    display: flex !important; gap: 8px; margin: 14px 0; flex-wrap: wrap;
  }
  .v3-live-chip {
    background: rgba(255,255,255,0.12) !important;
    padding: 8px 12px !important; border-radius: 12px !important;
    font-size: 13px !important; color: #fff !important;
  }
  .v3-live-chip b { color: #7FDB9A !important; }

  /* 검색창 */
  .v3-hero-search {
    display: flex !important; background: #fff !important;
    border-radius: 12px !important; padding: 4px 4px 4px 16px !important;
    align-items: center !important;
  }
  .v3-hero-search input {
    flex: 1 !important; border: none !important; outline: none !important;
    font-size: 14px !important; background: transparent !important;
  }
  .v3-hero-search button {
    background: #2D6A4F !important; color: #fff !important;
    border: none !important; padding: 10px 18px !important;
    border-radius: 8px !important; font-size: 14px !important;
    cursor: pointer !important;
  }

  /* ── 바로가기 바 ── */
  header .mobile-quickbar {
    position: static !important;
    background: #fff !important; border-top: 1px solid #eee !important;
    padding: 10px 0 10px 0 !important; overflow-x: auto !important;
    scrollbar-width: none !important; display: block !important;
    width: 100% !important;
  }
  .mobile-quickbar::-webkit-scrollbar { display: none !important; }
  .mobile-quickbar .quick-row {
    display: flex !important; gap: 8px !important;
    padding: 0 16px !important; width: max-content !important;
  }
  .mobile-quickbar .quick-chip {
    display: flex !important; align-items: center !important; gap: 6px !important;
    background: #F5F3EE !important; padding: 8px 14px !important;
    border-radius: 20px !important; font-size: 13px !important;
    font-weight: 600 !important; white-space: nowrap !important;
    text-decoration: none !important; color: #1A2E1F !important;
  }
  .mobile-quickbar .quick-chip .qi { font-size: 16px !important; }
  .mobile-quickbar-hint {
    display: block !important; text-align: center !important;
    padding: 8px !important; font-size: 12px !important;
    color: #999 !important; background: #fff !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
  }
  /* 힌트 바로 아래 히어로가 붙도록 */
  .mobile-quickbar-hint + .layout-wrapper .hero,
  .mobile-quickbar-hint + main .hero { margin-top: 0 !important; }

  /* ── 피드 섹션 ── */
  .v3-feed { padding: 12px !important; display: flex !important; flex-direction: column !important; gap: 12px !important; }
  .v3-feed-label {
    padding: 8px 4px 0 !important; font-size: 13px !important;
    font-weight: 700 !important; color: #6B8F76 !important;
    letter-spacing: 0.5px !important;
  }
  .v3-card {
    background: #fff !important; border-radius: 16px !important;
    padding: 16px !important; box-shadow: 0 1px 6px rgba(0,0,0,0.05) !important;
    cursor: pointer !important;
  }
  .v3-card-tag {
    display: inline-block !important; font-size: 11px !important;
    font-weight: 700 !important; padding: 4px 10px !important;
    border-radius: 12px !important; margin-bottom: 8px !important;
  }
  .v3-tag-hot { background: #FFF0EB !important; color: #D9480F !important; }
  .v3-tag-q { background: #E8F4FD !important; color: #1971C2 !important; }
  .v3-tag-dfw { background: #E6F9ED !important; color: #2D6A4F !important; }
  .v3-tag-market { background: #FFF8E1 !important; color: #F59F00 !important; }
  .v3-tag-club { background: #F3E8FF !important; color: #7C3AED !important; }
  .v3-card-author {
    display: flex !important; align-items: center !important; gap: 6px !important;
    margin-bottom: 8px !important; font-size: 12px !important; color: #888 !important;
  }
  .v3-avatar {
    width: 24px !important; height: 24px !important; border-radius: 50% !important;
    background: #2D6A4F !important; color: #fff !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 11px !important; font-weight: 700 !important; flex-shrink: 0 !important;
  }
  .v3-card-title {
    font-size: 16px !important; font-weight: 700 !important;
    line-height: 1.4 !important; margin-bottom: 6px !important; color: #1A2E1F !important;
  }
  .v3-card-preview {
    font-size: 14px !important; color: #555 !important; line-height: 1.55 !important;
    display: -webkit-box !important; -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important; overflow: hidden !important;
    margin-bottom: 10px !important; position: relative !important;
  }
  .v3-card-preview::after {
    content: '' !important; position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important; height: 20px !important;
    background: linear-gradient(to bottom, transparent, #fff) !important;
    pointer-events: none !important;
  }
  .v3-card-footer {
    display: flex !important; justify-content: space-between !important;
    align-items: center !important; font-size: 12px !important; color: #999 !important;
  }
  .v3-card-stats { display: flex !important; gap: 12px !important; }

  /* ── 홈 카드 썸네일 (2026-10-15): 사진 있는 글/매물만 표시 ── */
  .v3-card-main { display: flex !important; gap: 12px !important; align-items: flex-start !important; }
  .v3-card-text { flex: 1 !important; min-width: 0 !important; }
  .v3-thumb {
    width: 100px !important; height: 100px !important; object-fit: cover !important;
    border-radius: 12px !important; flex-shrink: 0 !important; background: #f0f0f0 !important;
  }
  .v3-card-text .v3-card-author { white-space: nowrap !important; overflow: hidden !important; }
  .v3-author-ellipsis { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; min-width: 0 !important; flex: 1 !important; }
  /* ── 장터 카드: 태그 옆 가격 (2026-10-15) ── */
  .v3-market-tagrow { display: flex !important; align-items: center !important; gap: 8px !important; }
  .v3-market-tagrow .v3-card-tag { margin-bottom: 0 !important; }
  .v3-market-price { color: #E03131 !important; font-weight: 800 !important; font-size: 11px !important; }

  /* 기존 섹션 숨김 (v3 피드로 대체) */
  #sec-trending, #sec-questions, #sec-dfw,
  #sec-quicklinks, #sec-market-jobs, #sec-attendance,
  .stats-bar { display: none !important; }

  /* order 초기화: v3 순서대로 (hero → v3-feed) */
  .main-container .hero { order: 0 !important; }
  #v3-feed { order: 1 !important; }

  /* ── 스켈레톤 로딩 (2026-10-08): 레이아웃 이동 방지 ── */
  .v3-skeleton { display: flex !important; flex-direction: column !important; gap: 12px !important; }
  .v3-skel-card {
    background: #fff !important; border-radius: 16px !important; padding: 16px !important;
    display: flex !important; flex-direction: column !important; gap: 10px !important;
  }
  .v3-skel-line {
    border-radius: 6px !important; height: 14px !important;
    background: linear-gradient(90deg, #eee 25%, #f7f7f7 50%, #eee 75%) !important;
    background-size: 200% 100% !important;
    animation: v3-skel-shimmer 1.2s ease-in-out infinite !important;
  }
  @keyframes v3-skel-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  [data-theme="dark"] .v3-skel-card { background: #1E3024 !important; }
  [data-theme="dark"] .v3-skel-line {
    background: linear-gradient(90deg, #2a3d30 25%, #34493c 50%, #2a3d30 75%) !important;
    background-size: 200% 100% !important;
  }

  /* ── 다크모드 (2026-10-08) ── */
  [data-theme="dark"] body { background: #0C1710 !important; }
  [data-theme="dark"] header .mobile-quickbar { background: #111E15 !important; border-top-color: rgba(34,197,94,0.14) !important; }
  [data-theme="dark"] .mobile-quickbar .quick-chip { background: #1E3024 !important; color: #F0FAF4 !important; }
  [data-theme="dark"] .mobile-quickbar-hint { background: #111E15 !important; color: #8EC4A0 !important; }
  [data-theme="dark"] .v3-hero-search { background: #1E3024 !important; }
  [data-theme="dark"] .v3-hero-search input { color: #F0FAF4 !important; }
  [data-theme="dark"] .v3-hero-search input::placeholder { color: #8EC4A0 !important; }
  [data-theme="dark"] .v3-feed-label { color: #8EC4A0 !important; }
  [data-theme="dark"] .v3-card { background: #1E3024 !important; box-shadow: 0 1px 6px rgba(0,0,0,0.3) !important; }
  [data-theme="dark"] .v3-card-title { color: #F0FAF4 !important; }
  [data-theme="dark"] .v3-card-preview { color: #C8E8D4 !important; }
  [data-theme="dark"] .v3-card-preview::after { background: linear-gradient(to bottom, transparent, #1E3024) !important; }
  [data-theme="dark"] .v3-card-author { color: #8EC4A0 !important; }
  [data-theme="dark"] .v3-card-footer { color: #8EC4A0 !important; }
}
