/* 모임(그룹) — groups.css */
/* 풀폭: 타 커뮤니티 페이지처럼 .al2-main이 좌우 여백 담당(community-v2.css) */
.gh-container { max-width: 100%; width: 100%; margin: 0; padding: 8px 0 60px; }

/* Hero */
.gh-hero { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); color: #fff; border-radius: 16px; padding: 26px 24px; margin-bottom: 20px; }
.gh-hero h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 6px; }
.gh-hero p { font-size: .9rem; opacity: .92; margin: 0; line-height: 1.55; }

/* Sections */
.gh-sec { margin-bottom: 26px; }
.gh-sec-title { font-size: 1.02rem; font-weight: 800; color: #1e293b; margin: 0 0 12px; display: flex; align-items: baseline; gap: 8px; }
.gh-sec-sub { font-size: .72rem; font-weight: 600; color: #94a3b8; }
.gh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }

/* Card */
.gh-card { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer; transition: .15s; }
.gh-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px rgba(99,102,241,.1); transform: translateY(-1px); }
.gh-card-rec { border-color: #c7d2fe; background: #f5f3ff; }
.gh-card-emoji { font-size: 1.6rem; flex: none; width: 38px; text-align: center; }
.gh-card-body { flex: 1; min-width: 0; }
.gh-card-name { font-size: .9rem; font-weight: 700; color: #1e293b; }
.gh-why { font-size: .64rem; font-weight: 700; color: #6366f1; background: #eef2ff; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.gh-card-meta { font-size: .72rem; color: #94a3b8; margin-top: 2px; }
.gh-card-facet { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.gh-joined { font-size: .72rem; font-weight: 700; color: #10b981; flex: none; }

/* Buttons */
.gh-btn { border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 8px; padding: 6px 12px; font-size: .78rem; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; transition: .15s; }
.gh-btn:hover { border-color: #94a3b8; }
.gh-btn-pri { background: #6366f1; border-color: #6366f1; color: #fff; }
.gh-btn-pri:hover { background: #4f46e5; border-color: #4f46e5; }
.gh-btn-ghost { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }
.gh-btn-sm { padding: 4px 10px; font-size: .72rem; flex: none; }

/* Opt-in / login */
.gh-optin { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; }
.gh-optin-txt b { display: block; font-size: .9rem; color: #92400e; }
.gh-optin-txt span { font-size: .76rem; color: #a16207; }
.gh-optin-txt i { font-style: normal; color: #ca8a04; }
.gh-optin-form { display: flex; gap: 6px; align-items: center; }
.gh-optin-form input { width: 110px; padding: 7px 10px; border: 1px solid #fcd34d; border-radius: 8px; font-size: .82rem; }

/* Group detail — 섹션 구분: 비어있지 않은 콘텐츠 섹션마다 상단 구분선+여백(흩어짐 방지) */
#ghGroup > #ghCalendar:not(:empty),
#ghGroup > #ghMeetups:not(:empty),
#ghGroup > #ghPolls:not(:empty),
#ghGroup > #ghResources:not(:empty),
#ghGroup > #ghPhotos:not(:empty),
#ghGroup > #ghMembers:not(:empty) {
  display: block;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f6;
}
/* ② 대화 — 소개 바로 아래, 컴포저+피드 묶음(사이 구분선 없이 붙임) */
#ghGroup > #ghComposer { margin-top: 18px; }
#ghGroup > #ghFeed:not(:empty) { display: block; margin-top: 4px; }

.gh-back { background: none; border: none; color: #6366f1; font-weight: 700; font-size: .82rem; cursor: pointer; padding: 4px 0; margin-bottom: 10px; }
.gh-ghead { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid #e2e8f0; border-radius: 14px; background: linear-gradient(135deg,#faf5ff,#eef2ff); margin-bottom: 18px; }
.gh-ghead-emoji { font-size: 2.4rem; flex: none; }
.gh-ghead-info { flex: 1; min-width: 0; }
.gh-ghead-info h1 { font-size: 1.25rem; font-weight: 800; margin: 0; color: #1e293b; }
.gh-ghead-meta { font-size: .78rem; color: #64748b; margin-top: 3px; }

/* Members roster */
.gh-mem-title { font-size: .86rem; font-weight: 800; color: #334155; margin: 0 0 10px; }
.gh-mem-title span { color: #6366f1; }
.gh-mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-bottom: 22px; }
.gh-mem { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; transition: .15s; }
.gh-mem:hover { border-color: #c7d2fe; background: #fafaff; }
.gh-mem-top { display: flex; gap: 9px; align-items: flex-start; }
.gh-mem-id { display: flex; gap: 9px; flex: 1; min-width: 0; align-items: center; text-decoration: none; color: inherit; }
.gh-mem-actions { flex: none; display: flex; gap: 4px; }
.gh-mem-actions2 { display: flex; flex-wrap: wrap; gap: 4px; }
.gh-mem-avwrap { position: relative; flex: none; display: inline-block; line-height: 0; }
.gh-av-crown { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-size: .7rem; line-height: 1; }
.gh-av-crown-co { background: #fdf2f8; }
.gh-mem-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.gh-mem-av-ph { background: #eef2ff; color: #6366f1; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.gh-mem-info { min-width: 0; flex: 1; }
.gh-mem-name { font-size: .82rem; font-weight: 700; color: #1e293b; line-height: 1.3; word-break: break-word; }
.gh-mem-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.gh-mem-co { font-size: .7rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-mem-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.gh-mem-chips .gh-chip { white-space: nowrap; }
.gh-mem-chips .gh-chip-more { background: #e2e8f0; color: #475569; font-weight: 700; }
.gh-chip { font-size: .62rem; background: #f1f5f9; color: #64748b; border-radius: 5px; padding: 1px 6px; }
.gh-mem-greet { font-size: .72rem; color: #6366f1; font-style: italic; line-height: 1.45; }

/* Composer */
.gh-composer { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; background: #fff; margin-bottom: 16px; }
.gh-composer textarea { width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px 11px; font-size: .86rem; resize: vertical; min-height: 62px; font-family: inherit; box-sizing: border-box; }
.gh-comp-actions { text-align: right; margin-top: 8px; }
.gh-comp-locked { text-align: center; font-size: .82rem; color: #64748b; padding: 6px; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* Feed */
.gh-feed { display: flex; flex-direction: column; gap: 10px; }
.gh-post { border: 1px solid #e2e8f0; border-radius: 12px; padding: 13px 15px; background: #fff; }
.gh-post-head { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.gh-post-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.gh-post-av-ph { background: #eef2ff; color: #6366f1; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.gh-post-author { font-size: .82rem; color: #1e293b; }
.gh-post-co { font-size: .7rem; color: #94a3b8; font-weight: 400; }
.gh-post-time { margin-left: auto; font-size: .68rem; color: #cbd5e1; }
.gh-post-body { font-size: .88rem; color: #334155; line-height: 1.6; margin: 8px 0; white-space: pre-wrap; word-break: break-word; }
.gh-post-actions { display: flex; gap: 6px; }
.gh-post-act { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 7px; padding: 3px 10px; font-size: .74rem; color: #64748b; cursor: pointer; }
.gh-post-act.on { background: #eef2ff; border-color: #c7d2fe; color: #4f46e5; }

/* Comments */
.gh-comments { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; }
.gh-cmt { font-size: .8rem; color: #475569; padding: 4px 0; }
.gh-cmt b { color: #1e293b; margin-right: 4px; }
.gh-cmt-form { display: flex; gap: 6px; margin-top: 8px; }
.gh-cmt-form input { flex: 1; border: 1px solid #e2e8f0; border-radius: 7px; padding: 6px 10px; font-size: .8rem; }

/* Calendar nav / photo delete — 데스크탑 컴팩트, 모바일 큰 터치 타깃(아래 @768) */
.gh-cal-nav { border: 1px solid #e2e8f0; background: #fff; border-radius: 7px; width: 28px; height: 28px; cursor: pointer; color: #64748b; font-size: 1rem; line-height: 1; }
.gh-photo-del { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.5); color: #fff; border: 0; border-radius: 6px; width: 22px; height: 22px; cursor: pointer; font-size: .66rem; line-height: 1; }

/* 사진 라이트박스 — 반응형 2-pane (데스크탑: 사진 좌 + 댓글 우 독립 스크롤 · 모바일: 세로 스택) */
.gh-pv-main { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.gh-pv-photo { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 10px; }
.gh-pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0,0,0,.42); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.gh-pv-nav:hover { background: rgba(0,0,0,.62); }
.gh-pv-prev { left: 10px; }
.gh-pv-next { right: 10px; }
.gh-pv-count { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.5); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 11px; border-radius: 99px; z-index: 2; }
.gh-pv-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.gh-pv-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; }
.gh-pv-dot.on { background: #fff; }
@media (max-width: 767px) { .gh-pv-nav { width: 34px; height: 34px; font-size: 1.2rem; background: rgba(0,0,0,.3); } }
.gh-pv-photo img { -webkit-user-select: none; user-select: none; }
.gh-heart-pop { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0); font-size: 5rem; z-index: 3; pointer-events: none; animation: gh-heart .8s ease-out forwards; filter: drop-shadow(0 2px 10px rgba(0,0,0,.4)); }
@keyframes gh-heart { 0% { transform: translate(-50%,-50%) scale(0); opacity: 0; } 15% { transform: translate(-50%,-50%) scale(1.25); opacity: 1; } 40% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(1.15); opacity: 0; } }
.gh-pv-photo img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; display: block; }
.gh-pv-side { flex: none; width: 360px; background: #fff; display: flex; flex-direction: column; min-height: 0; border-radius: 12px; overflow: hidden; }
.gh-pv-side-head { flex: none; padding: 12px 14px; border-bottom: 1px solid #f1f5f9; }
.gh-pv-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 14px; }
.gh-pv-input { flex: none; padding: 10px 14px; border-top: 1px solid #f1f5f9; display: flex; gap: 6px; align-items: center; }
@media (max-width: 767px) {
  .gh-pv-main { flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .gh-pv-photo { flex: none; padding: 8px; }
  .gh-pv-photo img { max-height: 48vh; }
  .gh-pv-side { width: 100%; flex: none; border-radius: 12px 12px 0 0; }
  .gh-pv-scroll { overflow: visible; }
  .gh-pv-input { position: sticky; bottom: 0; background: #fff; }
}

/* Misc */
.gh-loading, .gh-loading-sm, .gh-empty-sm { text-align: center; color: #94a3b8; font-size: .82rem; padding: 20px; }
.gh-loading-sm, .gh-empty-sm { padding: 12px; }
.gh-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1e293b; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: .84rem; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 9999; }
.gh-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .gh-grid, .gh-mem-grid { grid-template-columns: 1fr; }
  .gh-optin { flex-direction: column; align-items: stretch; }
}
/* 🆕 2026-07-21 P1/P2 모바일 최적화 */
@media (max-width: 768px) {
  /* P1-2 터치 타깃 — 주요 버튼 최소 높이(오탭 방지) */
  .gh-btn { min-height: 40px; }
  .gh-btn-sm { min-height: 34px; padding: 6px 11px; }
  .gh-post-act { min-height: 34px; padding: 5px 12px; }
  /* P1-3 작은 폰트 가독성 — 칩·메타 상향 */
  .gh-chip { font-size: .68rem; }
  .gh-card-meta, .gh-mem-co, .gh-post-co { font-size: .74rem; }
  /* P2-7 토스트가 하단 탭바와 겹치지 않게 위로 */
  .gh-toast { bottom: 84px; }
  /* P1-2 캘린더 네비·사진 삭제 터치 타깃 확대 */
  .gh-cal-nav { width: 38px; height: 38px; font-size: 1.1rem; }
  .gh-photo-del { width: 32px; height: 32px; font-size: .8rem; }
}
