/* ============================================================
   동네원장(지역 소모임) 공통 스타일 — hw_v2 토큰 기반 (.mo- 프리픽스)
   컬러/radius/폰트는 var(--hw-*) 참조. #7A4EFE 하드코딩 금지.
   ============================================================ */

.mo-wrap { max-width: 600px; margin: 0 auto; padding: 16px 12px 96px; font-family: var(--hw-font, 'Pretendard', sans-serif); color: var(--hw-ink, #1A1C1E); }
/* index/view 넓은 폭(PC): 전역 .sub 프레임(hw_v2.css, 헤더 1180+24 정렬)을 꽉 채움. 모바일은 기본(600/16) 상속 */
@media (min-width: 1024px) { .mo-wrap.mo-wide { max-width: none; padding-left: 0; padding-right: 0; } }
/* PC(2단 레이아웃)에서는 상단 뒤로가기 아이콘 숨김 — 모바일에서만 노출 */
@media (min-width: 1024px) { .mo-back { display: none !important; } }
/* 헤더 아래 전역 .sub 상단여백(100px) 축소 — hw_v2 :has 규칙이 전역 !important에 밀려 직접 강제 */
#contents_wrap > .sub { padding-top: 14px !important; }
/* 2단 그리드(hw_desktop_side.php)의 상단 30px 은 .mo-wrap 자체 여백과 겹치므로 제거.
   결과: 타이틀이 헤더에서 100px 지점 — 헤어상담소 상세('목록으로' 101px)와 동일 */
@media (min-width: 1024px) { .hw-board2col.moim-2col { padding-top: 0; } }
/* 페이지 배경색 없음 (흰 바탕) — 동네원장 글 상세(rb.moim_bbs)와 동일하게 맞춤 */
.mo-wrap * { box-sizing: border-box; }
.mo-wrap a { text-decoration: none; color: inherit; }

/* ── 페이지 타이틀 ── */
.mo-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.mo-title h1 { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -0.03em; font-family: var(--hw-font, 'Pretendard Variable', Pretendard, sans-serif); }
/* padding:0 !important — 전역 섹션 래퍼 .sub{padding:50px..!important}(custom.min.css)와
   클래스명이 충돌해 부제에 상단 50px가 붙던 문제 차단(index/form/my 공통) */
/* 서브타이틀 — 헤어인사이트(.hi-hsub)·디자이너룸(.dr-hsub)과 동일 위계 */
.mo-title .sub { font-size: 13.5px; color: var(--hw-ink-3, #75777B); margin-top: 6px; font-weight: 500; letter-spacing: -0.01em; padding: 0 !important; min-height: 0 !important; font-family: var(--hw-font, 'Pretendard Variable', Pretendard, sans-serif); }

/* ── 필터 행: 지역 버튼 + 정렬 ── */
.mo-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mo-region-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border: 1px solid var(--hw-line, #E7E8EA); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.mo-geo-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border: 1px solid var(--hw-grape-300, #C9B8FF); border-radius: 999px; background: var(--hw-grape-50, #F3EFFF); color: var(--hw-grape-700, #6A3CEF); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mo-geo-btn:hover { background: var(--hw-grape-100, #E9E0FF); }
.mo-geo-btn:disabled { opacity: .6; cursor: default; }
.mo-sort { margin-left: auto; display: flex; gap: 4px; }
.mo-sort a { font-size: 12px; padding: 6px 10px; border-radius: 999px; color: var(--hw-ink-3, #75777B); }
.mo-sort a.on { background: var(--hw-surface-2, #F4F5F7); color: var(--hw-ink, #1A1C1E); font-weight: 700; }

/* ── 카테고리 칩 탭 (가로 스크롤) ── */
.mo-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mo-chips::-webkit-scrollbar { display: none; }
.mo-chip { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--hw-line, #E7E8EA); background: #fff; font-size: 15px; font-weight: 600; color: var(--hw-ink-2, #46484C); cursor: pointer; white-space: nowrap; }
.mo-chip.on { background: var(--hw-ink, #1A1C1E); border-color: var(--hw-ink, #1A1C1E); color: #fff; }

/* ── 모임 카드 리스트 ── */
/* 게시글 목록 좌측을 상단 카테고리 칩의 글자와 정렬 (칩 pill 내부 padding 14px 보정) */
.mo-list { display: flex; flex-direction: column; padding-left: 14px; }
.mo-card { display: flex; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--hw-surface-2, #F4F5F7); align-items: flex-start; }
.mo-card:active { background: var(--hw-surface-2, #F4F5F7); }
.mo-card .thumb { flex: 0 0 auto; width: 72px; height: 72px; border-radius: var(--hw-r-md, 14px); object-fit: cover; background: var(--hw-surface-2, #F4F5F7); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mo-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mo-card .body { flex: 1; min-width: 0; }
.mo-card .nm { font-size: 16.5px; font-weight: 800; margin: 2px 0 4px; letter-spacing: -0.2px; }
.mo-card .intro { font-size: 14px; color: var(--hw-ink-2, #46484C); line-height: 1.45; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mo-card .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--hw-ink-3, #75777B); }
.mo-card .meta .dot::before { content: '·'; margin-right: 8px; color: var(--hw-ink-4, #B9BBBE); }

/* ── 데스크탑: 디자이너룸(rb.guest_bbs PC) 정합 — 흰 카드+호버 그림자, 칩은 배경 톤 ── */
@media (min-width: 1024px) {
    /* 모임 카드: 흰 배경 + 보더 + 라운드, 호버 시 그림자·상승 (dr-card와 동일 수치) */
    .mo-card { background: #fff; border: 1px solid var(--hw-line, #E7E8EA); border-radius: 18px; padding: 22px 26px; margin-bottom: 14px; transition: box-shadow .16s ease, transform .16s ease; }
    .mo-card:hover { box-shadow: 0 6px 22px rgba(24, 26, 30, 0.08); transform: translateY(-1px); }
    .mo-card:active { background: #fff; }
    /* 카테고리 칩: 페이지 배경 톤(surface-2, 보더 제거) → 활성 보라(grape-700), 호버 시 톤 변경 (dr-chips-nav와 동일) */
    .mo-chip { border-color: transparent; background: var(--hw-surface-2, #F4F5F7); color: var(--hw-ink-2, #46484C); transition: background .15s ease, color .15s ease; }
    .mo-chip:hover { background: var(--hw-surface-3, #E9EAEC); color: var(--hw-ink, #1A1C1E); }
    .mo-chip.on { background: var(--hw-grape-700, #6A3CEF); border-color: transparent; color: #fff; }
    .mo-chip.on:hover { background: var(--hw-grape-600, #7B52F0); color: #fff; }
    /* 칩 줄 ~ 카드 리스트 간격 (디자이너룸 14px 정합) */
    .mo-chips { padding-bottom: 14px; }
    /* 지역 선택·정렬 pill 호버 톤 */
    .mo-region-btn { transition: border-color .15s ease, color .15s ease; }
    .mo-region-btn:hover { border-color: var(--hw-grape-300, #C9B8FF); color: var(--hw-grape-700, #6A3CEF); }
    .mo-sort a { transition: color .15s ease; }
    .mo-sort a:hover { color: var(--hw-ink, #1A1C1E); }
}

/* ── 배지 ── */
.mo-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.mo-badge.grape { background: var(--hw-grape-50, #F1EBFF); color: var(--hw-grape-700, #6A3CEF); }
.mo-badge.gold { background: #FFF6DC; color: #9A7A16; }
.mo-badge.gray { background: var(--hw-surface-2, #F4F5F7); color: var(--hw-ink-3, #75777B); }
.mo-badge.red { background: #FEE9EC; color: #D4405B; }
.mo-badge.green { background: #E5F6EC; color: #148543; }

/* ── 플로팅 만들기 버튼 ── */
.mo-fab { position: fixed; right: 18px; bottom: 100px; z-index: 90; display: inline-flex; align-items: center; gap: 6px; padding: 13px 20px; border-radius: 999px; background: var(--hw-grad-brand, linear-gradient(135deg, #7B4EFE, #5E2FE6)); color: #fff !important; font-size: 15px; font-weight: 800; box-shadow: var(--hw-sh-brand, 0 8px 20px rgba(106, 60, 239, .35)); border: 0; cursor: pointer; }
@media (min-width: 1025px) { .mo-fab { bottom: 40px; } }

/* ── 빈 상태 ── */
.mo-empty { text-align: center; padding: 56px 16px; }
.mo-empty .tt { font-size: 17.5px; font-weight: 800; margin-bottom: 7px; }
.mo-empty .sb { font-size: 14px; color: var(--hw-ink-3, #75777B); margin-bottom: 18px; line-height: 1.5; }

/* ── 버튼 ── */
.mo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: var(--hw-r-md, 14px); font-size: 15px; font-weight: 800; border: 0; cursor: pointer; }
.mo-btn.grad { background: var(--hw-grad-brand, linear-gradient(135deg, #7B4EFE, #5E2FE6)); color: #fff !important; }
.mo-btn.line { background: #fff; border: 1px solid var(--hw-line, #E7E8EA); color: var(--hw-ink, #1A1C1E); }
.mo-btn.gray { background: var(--hw-surface-2, #F4F5F7); color: var(--hw-ink-2, #46484C); }
.mo-btn.grape-line { background: #fff; border: 1.5px solid var(--hw-grape-300, #C9B8FF); color: var(--hw-grape-700, #6A3CEF); }
.mo-btn.grape-line:hover { background: var(--hw-grape-50, #F1EBFF); border-color: var(--hw-grape-400, #B49BFF); }
.mo-btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; font-weight: 700; }
.mo-btn.block { display: flex; width: 100%; }
.mo-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── 만들기/수정 폼 ── */
.mo-form { display: flex; flex-direction: column; gap: 20px; }
.mo-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.mo-field label .opt { color: var(--hw-ink-4, #B9BBBE); font-weight: 500; margin-left: 4px; }
.mo-field input[type="text"], .mo-field input[type="number"], .mo-field input[type="datetime-local"], .mo-field textarea, .mo-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hw-line, #E7E8EA); border-radius: var(--hw-r-md, 14px); font-size: 15px; font-family: inherit; background: #fff; color: var(--hw-ink, #1A1C1E);
}
.mo-field input:focus, .mo-field textarea:focus, .mo-field select:focus { outline: none; border-color: var(--hw-grape-700, #6A3CEF); }
.mo-field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.mo-field .hint { font-size: 12px; color: var(--hw-ink-4, #B9BBBE); margin-top: 5px; }
.mo-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.mo-choice .c { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--hw-line, #E7E8EA); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--hw-ink-2, #46484C); }
.mo-choice .c.on { border-color: var(--hw-grape-700, #6A3CEF); background: var(--hw-grape-50, #F1EBFF); color: var(--hw-grape-700, #6A3CEF); font-weight: 700; }
.mo-radio-cards { display: flex; flex-direction: column; gap: 8px; }
.mo-radio-cards .rc { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--hw-line, #E7E8EA); border-radius: var(--hw-r-md, 14px); cursor: pointer; }
.mo-radio-cards .rc.on { border-color: var(--hw-grape-700, #6A3CEF); background: var(--hw-grape-50, #F1EBFF); }
.mo-radio-cards .rc .tt { font-size: 14px; font-weight: 700; }
.mo-radio-cards .rc .sb { font-size: 12px; color: var(--hw-ink-3, #75777B); margin-top: 2px; line-height: 1.45; }
.mo-cover-up { width: 100%; height: 150px; border: 1.5px dashed var(--hw-line, #E7E8EA); border-radius: var(--hw-r-md, 14px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--hw-ink-3, #75777B); font-size: 13px; cursor: pointer; background: var(--hw-surface-3, #FAFAFB); background-size: cover; background-position: center; overflow: hidden; }

/* ── 스텝 인디케이터 ── */
.mo-steps { display: flex; gap: 5px; margin-bottom: 18px; }
.mo-steps .s { height: 4px; flex: 1; border-radius: 2px; background: var(--hw-surface-2, #F4F5F7); }
.mo-steps .s.on { background: var(--hw-grape-700, #6A3CEF); }

/* ── 상세: 커버/헤더 ── */
.mo-cover { width: calc(100% + 32px); margin: -16px -16px 0; height: 210px; background: var(--hw-surface-2, #F4F5F7); position: relative; overflow: hidden; }
.mo-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ── 모바일/태블릿 상세: 커버를 뷰포트 풀블리드 + 헤더 바로 아래 + 뒤로버튼 오버레이 ──
   커버가 있는 상세(.mo-has-cover)만 대상. 커버 없는 모임은 기존(뒤로버튼 흐름 내) 유지.
   :has() 미지원 구형 브라우저는 상단 14px 여백만 잔존(파손 없음). */
@media (max-width: 1024px) {
  /* 헤더 아래 전역 .sub 상단여백(14px)을 커버 상세에선 제거 → 커버가 헤더에 밀착 */
  #contents_wrap > .sub:has(.mo-has-cover) { padding-top: 0 !important; }
  .mo-wrap.mo-has-cover { position: relative; padding-top: 0 !important; }
  /* 커버: 부모 좌우 padding 무시하고 뷰포트 전체 폭(100vw) */
  .mo-has-cover .mo-cover { width: 100vw; margin: 0 0 0 calc(50% - 50vw); }
  /* 뒤로버튼: 커버 좌상단 오버레이 (반투명 어두운 pill·흰 글씨, 인라인 margin 무력화) */
  .mo-has-cover .mo-back { position: absolute; top: 12px; left: 12px; margin: 0 !important; padding: 0 !important; z-index: 10; }
  .mo-has-cover .mo-back a { background: rgba(20, 22, 26, 0.5) !important; color: #fff !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22); }
}

.mo-head { padding: 16px 0 12px; border-bottom: 1px solid var(--hw-surface-2, #F4F5F7); }
.mo-head h1 { font-size: 20px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.3px; }
.mo-head .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--hw-ink-3, #75777B); }

/* ── 상세: 신뢰 블록 ── */
.mo-trust { display: flex; flex-direction: column; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--hw-surface-2, #F4F5F7); }
.mo-trust .row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--hw-ink-2, #46484C); }

/* ── 상세: 통계/소개 ── */
.mo-stats { display: flex; gap: 14px; font-size: 13px; color: var(--hw-ink-3, #75777B); padding: 13px 0; border-bottom: 1px solid var(--hw-surface-2, #F4F5F7); }
.mo-stats b { color: var(--hw-ink, #1A1C1E); font-weight: 800; margin-left: 3px; }
.mo-desc { padding: 16px 0; font-size: 14.5px; line-height: 1.65; color: var(--hw-ink-2, #46484C); white-space: pre-wrap; word-break: break-word; border-bottom: 8px solid var(--hw-surface-3, #FAFAFB); }

/* ── 섹션 ── */
.mo-sec { padding: 20px 0 8px; }
.mo-sec .sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mo-sec .sec-h h2 { font-size: 16px; font-weight: 800; margin: 0; }
.mo-sec .sec-h .more { font-size: 13px; color: var(--hw-ink-3, #75777B); }

/* ── 모임장 카드 ── */
.mo-leader { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--hw-line, #E7E8EA); border-radius: var(--hw-r-lg, 18px); }
.mo-leader .ava { width: 48px; height: 48px; border-radius: 50%; background: var(--hw-surface-2, #F4F5F7); overflow: hidden; flex: 0 0 auto; }
.mo-leader .ava img { width: 100%; height: 100%; object-fit: cover; }
.mo-leader .inf { flex: 1; min-width: 0; }
.mo-leader .nm { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mo-leader .sb { font-size: 12.5px; color: var(--hw-ink-3, #75777B); margin-top: 3px; line-height: 1.45; }

/* ── 탭 (멤버 뷰) ── */
.mo-tabs { display: flex; border-bottom: 1px solid var(--hw-line, #E7E8EA); margin: 4px -16px 0; padding: 0 16px; position: sticky; top: 0; background: #fff; z-index: 5; }
.mo-tabs a { flex: 1; text-align: center; padding: 13px 0 11px; font-size: 14.5px; font-weight: 700; color: var(--hw-ink-3, #75777B); border-bottom: 2px solid transparent; }
.mo-tabs a.on { color: var(--hw-ink, #1A1C1E); border-bottom-color: var(--hw-ink, #1A1C1E); }

/* ── 일정 카드 ── */
.mo-sched { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--hw-line, #E7E8EA); border-radius: var(--hw-r-lg, 18px); margin-bottom: 10px; align-items: flex-start; }
.mo-sched .dt { flex: 0 0 auto; width: 46px; text-align: center; background: var(--hw-grape-50, #F1EBFF); border-radius: 12px; padding: 7px 0; }
.mo-sched .dt .m { display: block; font-size: 11px; font-weight: 700; color: var(--hw-grape-700, #6A3CEF); }
.mo-sched .dt .d { display: block; font-size: 19px; font-weight: 800; color: var(--hw-grape-700, #6A3CEF); line-height: 1.1; }
.mo-sched .body { flex: 1; min-width: 0; }
.mo-sched .tt { font-size: 14.5px; font-weight: 800; margin-bottom: 4px; }
.mo-sched .meta { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 12.5px; color: var(--hw-ink-3, #75777B); margin-bottom: 8px; }
.mo-sched .meta span { display: inline-flex; align-items: center; gap: 3px; }
.mo-sched .foot { display: flex; align-items: center; gap: 6px; }
.mo-avas { display: flex; }
.mo-avas .a { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #fff; background: var(--hw-surface-2, #F4F5F7); overflow: hidden; margin-left: -6px; }
.mo-avas .a:first-child { margin-left: 0; }
.mo-avas .a img { width: 100%; height: 100%; object-fit: cover; }

/* ── 멤버 행 ── */
.mo-member { display: flex; align-items: center; gap: 11px; padding: 11px 0; }
.mo-member .ava { width: 42px; height: 42px; border-radius: 50%; background: var(--hw-surface-2, #F4F5F7); overflow: hidden; flex: 0 0 auto; }
.mo-member .ava img { width: 100%; height: 100%; object-fit: cover; }
.mo-member .inf { flex: 1; min-width: 0; }
.mo-member .nm { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.mo-member .nm .rg { font-size: 12px; color: var(--hw-ink-3, #75777B); font-weight: 500; }
.mo-member .sb { font-size: 12.5px; color: var(--hw-ink-3, #75777B); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-member .act { display: flex; gap: 6px; flex: 0 0 auto; }

/* ── 피드 글 행 ── */
.mo-post { padding: 13px 0; border-bottom: 1px solid var(--hw-surface-2, #F4F5F7); display: block; }
.mo-post .ca { font-size: 11.5px; font-weight: 700; color: var(--hw-grape-700, #6A3CEF); margin-bottom: 3px; }
.mo-post .tt { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; line-height: 1.4; }
.mo-post .meta { font-size: 12px; color: var(--hw-ink-4, #B9BBBE); display: flex; gap: 8px; }

/* ── 하단 고정 CTA 바 ── */
.mo-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: #fff; border-top: 1px solid var(--hw-line, #E7E8EA); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.mo-cta .in { max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.mo-cta .proof { text-align: center; font-size: 12.5px; color: var(--hw-ink-3, #75777B); padding-bottom: 8px; }
.mo-cta .proof b { color: var(--hw-grape-700, #6A3CEF); }

/* ── 모달 (지역 선택 등) ── */
.mo-modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1000; display: none; }
.mo-modal-bg.show { display: block; }
.mo-modal { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; max-height: 78vh; background: #fff; border-radius: 20px 20px 0 0; z-index: 1001; display: none; flex-direction: column; }
.mo-modal.show { display: flex; }
@media (min-width: 1025px) { .mo-modal { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 20px; } }
.mo-modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 10px; }
.mo-modal .mh .tt { font-size: 16px; font-weight: 800; }
.mo-modal .mh button { background: none; border: 0; cursor: pointer; padding: 4px; }
.mo-modal .mb { overflow-y: auto; padding: 4px 12px 22px; }
.mo-modal .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mo-modal .grid .g { padding: 10px 6px; text-align: center; border: 1px solid var(--hw-line, #E7E8EA); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; color: var(--hw-ink-2, #46484C); }
.mo-modal .grid .g.on { border-color: var(--hw-grape-700, #6A3CEF); background: var(--hw-grape-50, #F1EBFF); color: var(--hw-grape-700, #6A3CEF); font-weight: 700; }

/* ── 안내 문구(면책) ── */
.mo-note { font-size: 11.5px; color: var(--hw-ink-4, #B9BBBE); line-height: 1.55; padding: 14px 0 4px; }
