@charset "utf-8";
/* ============================================================
   VESON 갤러리 스킨 — 좌 메이슨리 / 우 상세 + 세련된 댓글
   (theme 의 --color-* / --font-* / --gnb-height 변수 사용)
   ============================================================ */

/* 폰트 통일 — 게시판 전체를 본문 폰트(Pretendard) 한 벌로. 에디터/기본 마크업 폰트 혼입 차단.
   (--font-display 은 라틴 전용 Cinzel 이라 한글이 시스템 세리프로 깨지므로 게시판엔 미사용) */
.gallery-wrap, #bo_v, #bo_w, #bo_vc, #bo_vc_w, .imm-write { font-family: var(--font-body); }
.ig-body, .ig-body * { font-family: var(--font-body) !important; }
#bo_v input, #bo_v textarea, #bo_v select, #bo_w input, #bo_w textarea, #bo_w select { font-family: var(--font-body); }
/* reset.css 의 h1~h6 { font-family: --font-display(Cinzel) } 가 한글 헤딩(댓글목록·댓글쓰기 등)에 걸려 세리프로 깨지므로 강제 덮어씀 */
.gallery-wrap h1, .gallery-wrap h2, .gallery-wrap h3,
#bo_v h1, #bo_v h2, #bo_v h3, #bo_v h4,
#bo_w h1, #bo_w h2, #bo_w h3,
#bo_vc h2, #bo_vc_w h2 { font-family: var(--font-body) !important; }

.gallery-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: calc(var(--gnb-height, 64px) + 24px) 24px 80px;
}
.gallery-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.gallery-title { font-family: var(--font-body); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; letter-spacing: 0.02em; margin: 0; }
.gallery-write-btn {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  background: var(--color-accent, #1A1A1A); color: var(--color-white, #fff);
  font-size: 0.85rem; letter-spacing: 0.03em; white-space: nowrap; transition: var(--transition, .2s ease);
}
.gallery-write-btn:hover { opacity: 0.86; }

.gallery-body { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.gallery-left { min-width: 0; }

/* ---- 메이슨리 (CSS multi-column) ---- */
.gal-grid { columns: 3; column-gap: 14px; }
.gal-card {
  display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: none;
  cursor: pointer; break-inside: avoid; position: relative; border-radius: 12px; overflow: hidden; text-align: left;
}
.gal-card img { width: 100%; height: auto; display: block; border-radius: 12px; transition: transform .45s ease; }
.gal-card:hover img { transform: scale(1.035); }
.gal-noimg { display: flex; align-items: center; justify-content: center; height: 180px; border-radius: 12px; background: var(--color-surface, #f5f5f5); color: #b3b3b3; font-size: 0.8rem; }
.gal-card-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 12px 10px;
  font-size: 0.82rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.62));
  border-radius: 0 0 12px 12px; opacity: 0; transition: opacity .3s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gal-card:hover .gal-card-cap, .gal-card.is-active .gal-card-cap { opacity: 1; }
.gal-card.is-active { outline: 2px solid var(--color-accent, #1A1A1A); outline-offset: 2px; }

.gal-empty { padding: 60px 0; text-align: center; color: #999; }
.gal-empty a { color: var(--color-accent, #1A1A1A); font-weight: 600; }
.gal-paging { margin-top: 32px; text-align: center; }

/* ---- 우 상세 (스티키) ---- */
.gallery-right { position: sticky; top: calc(var(--gnb-height, 64px) + 24px); }
.gal-detail { border: 1px solid var(--color-border-light, #eee); border-radius: 16px; padding: 16px; background: var(--color-white, #fff); }
.gal-detail-empty { padding: 64px 12px; text-align: center; color: #b3b3b3; font-size: 0.88rem; }
.gal-detail-thumb { border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: var(--color-surface, #f5f5f5); }
.gal-detail-thumb img { width: 100%; height: auto; display: block; }
.gal-detail-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.gal-detail-meta { font-size: 0.78rem; color: var(--color-text-muted, #999); margin-bottom: 12px; }
.gal-detail-desc { font-size: 0.9rem; line-height: 1.7; color: var(--color-text-secondary, #555); margin: 0 0 18px; }
.gal-detail-btn { display: block; text-align: center; padding: 12px; border-radius: 999px; background: var(--color-accent, #1A1A1A); color: var(--color-white, #fff); font-size: 0.88rem; letter-spacing: 0.02em; transition: var(--transition, .2s ease); }
.gal-detail-btn:hover { opacity: 0.86; }

/* ---- 반응형 ---- */
@media (max-width: 1100px) { .gal-grid { columns: 2; } }
@media (max-width: 900px) {
  .gallery-body { grid-template-columns: 1fr; }
  .gallery-right { position: static; margin-top: 8px; }
  .gallery-wrap { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 480px) { .gal-grid { column-gap: 10px; } }

/* ============================================================
   게시물 보기 (view) — 인스타형 2단 (좌 이미지 / 우 본문·댓글)
   ============================================================ */
#bo_v.ig-view {
  max-width: 1080px !important; width: auto !important; margin: 0 auto;
  padding: calc(var(--gnb-height, 64px) + 24px) 24px 60px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 34px; align-items: start;
}
.ig-media { position: sticky; top: calc(var(--gnb-height, 64px) + 24px); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ig-media img { width: 100%; height: auto; display: block; border-radius: 14px; }
.ig-media a { display: block; }
.ig-panel { min-width: 0; }

.ig-cate { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted, #999); }
.ig-title { font-family: var(--font-body); font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; margin: 4px 0 16px; }
.ig-author { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border-light, #eee); margin-bottom: 18px; }
.ig-avatar img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.ig-author-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ig-author-meta strong { font-size: 0.9rem; font-weight: 600; }
.ig-author-meta strong small { font-weight: 400; color: var(--color-text-muted, #aaa); }
.ig-author-meta .ig-sub { font-size: 0.74rem; color: var(--color-text-muted, #aaa); }
.ig-opt { position: relative; flex: 0 0 auto; }
.ig-opt-btn { border: none; background: none; font-size: 1.15rem; color: var(--color-text-muted, #bbb); cursor: pointer; padding: 4px 8px; line-height: 1; }
.ig-opt-menu { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--color-border, #ddd); border-radius: 8px; padding: 4px; list-style: none; box-shadow: 0 6px 20px rgba(0,0,0,0.1); z-index: 6; }
.ig-opt-menu li a { display: block; padding: 7px 18px; font-size: 0.82rem; color: var(--color-text, #222); white-space: nowrap; }
.ig-opt-menu li a:hover { background: var(--color-surface, #f5f5f5); }

.ig-body { font-size: 0.95rem; line-height: 1.8; color: var(--color-text, #222); word-break: break-word; margin-bottom: 20px; }
.ig-body img { max-width: 100%; height: auto; border-radius: 8px; }
.ig-sign { font-size: 0.8rem; color: var(--color-text-muted, #999); margin: 0 0 16px; }
.ig-act { display: flex; gap: 10px; margin-bottom: 18px; }
.ig-act-btn { padding: 8px 16px; border: 1px solid var(--color-border, #ddd); border-radius: 999px; font-size: 0.82rem; color: var(--color-text-secondary, #555); }
.ig-act-btn:hover { border-color: var(--color-text, #222); color: var(--color-text, #222); }
.ig-files { list-style: none; padding: 0; margin: 0 0 18px; font-size: 0.82rem; }
.ig-files a { color: var(--color-text-secondary, #555); }

.ig-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 26px; }
.ig-list-btn, .ig-write-btn { padding: 10px 20px; border-radius: 999px; font-size: 0.84rem; }
.ig-list-btn { border: 1px solid var(--color-border, #ddd); color: var(--color-text-secondary, #555); }
.ig-list-btn:hover { border-color: var(--color-text, #222); color: var(--color-text, #222); }
.ig-write-btn { background: var(--color-accent, #1A1A1A); color: #fff; }
.ig-write-btn:hover { opacity: 0.86; }
.ig-pn { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--color-border-light, #eee); }
.ig-pn li { display: flex; gap: 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--color-border-light, #eee); font-size: 0.84rem; }
.ig-pn li span { color: var(--color-text-muted, #999); flex: 0 0 auto; }
.ig-pn li a { color: var(--color-text, #222); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 댓글을 오른쪽 패널 폭에 맞게 (기존 820 중앙정렬 해제) */
.ig-panel #bo_vc, .ig-panel #bo_vc_w { max-width: none; margin-left: 0; margin-right: 0; }
.ig-view .cmt_btn { margin: 24px 0 0 !important; }

@media (max-width: 900px) {
  #bo_v.ig-view { grid-template-columns: 1fr; gap: 22px; padding-left: 16px; padding-right: 16px; }
  .ig-media { position: static; }
}

/* ============================================================
   댓글 (view_comment) — 세련된 구조 (기본 로직 유지, 스타일만)
   ============================================================ */
/* 댓글 헤더 = "댓글 N" 한 줄만 (댓글목록/댓글쓰기 제목행 제거) */
#bo_v .cmt_btn {
  display: block; width: 100%; text-align: left; cursor: default; pointer-events: none;
  padding: 0 0 12px; border: none; background: none;
  border-bottom: 1px solid var(--color-border-light, #eee);
  font-size: 0.92rem; font-weight: 600; color: var(--color-text, #222);
}
#bo_v .cmt_btn .total b { font-weight: 600; }
#bo_v .cmt_btn .cmt_more { display: none; }
#bo_vc { max-width: none; margin: 0; }
#bo_vc > h2, #bo_vc_w > h2 { display: none; }   /* "댓글목록" · "댓글쓰기" 제목 제거 */

#bo_vc article { display: flex; gap: 10px; align-items: flex-start; padding: 14px 2px; border-top: 1px solid var(--color-border-light, #f0f0f0); position: relative; }
#bo_vc article:first-of-type { border-top: none; }
/* 답글 — 세로 라인으로 계층 표현 */
#bo_vc article[style*="margin-left"] { border-top: none; }
#bo_vc article[style*="margin-left"]::before { content: ""; position: absolute; left: -14px; top: 18px; bottom: 18px; width: 2px; background: var(--color-border-light, #eee); border-radius: 2px; }
#bo_vc .pf_img img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
#bo_vc .cm_wrap { flex: 1; min-width: 0; }
#bo_vc .cm_wrap header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
#bo_vc .cm_wrap header h2 { display: none; }
#bo_vc .cm_wrap header > *:not(h2) { font-size: 0.85rem; font-weight: 600; color: var(--color-text, #222); }
#bo_vc .bo_vc_hdinfo { font-size: 0.73rem !important; font-weight: 400 !important; color: var(--color-text-muted, #aaa) !important; }
#bo_vc .cmt_contents { margin-top: 4px; }
#bo_vc .cmt_contents p { font-size: 0.89rem; line-height: 1.6; color: var(--color-text-secondary, #444); margin: 0; word-break: break-word; }
.bo_vl_opt { position: relative; flex: 0 0 auto; }
.btn_cm_opt { border: none; background: none; color: var(--color-text-muted, #bbb); cursor: pointer; padding: 4px 6px; }
.bo_vc_act { position: absolute; right: 0; background: #fff; border: 1px solid var(--color-border, #ddd); border-radius: 8px; padding: 4px; list-style: none; box-shadow: 0 6px 20px rgba(0,0,0,0.1); display: none; z-index: 5; }
.bo_vc_act li a { display: block; padding: 6px 16px; font-size: 0.8rem; color: var(--color-text, #222); white-space: nowrap; }
.bo_vc_act li a:hover { background: var(--color-surface, #f5f5f5); }
#bo_vc_empty { text-align: center; color: #aaa; padding: 26px 0; font-size: 0.85rem; }

/* 댓글 입력 — 인스타형 한 줄 (둥근 입력창 + 게시 버튼) · #fviewcomment 로 스코프해 답글 이동시에도 유지 */
#bo_vc_w { max-width: none; margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--color-border-light, #eee); }
#fviewcomment .sound_only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#fviewcomment { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
#fviewcomment textarea { flex: 1 1 200px; min-width: 0; height: 46px; min-height: 46px; padding: 12px 16px; border: 1px solid var(--color-border, #ddd); border-radius: 23px; font-size: 0.9rem; line-height: 1.4; resize: none; box-sizing: border-box; transition: height .2s ease, border-radius .2s ease, border-color .2s ease; }
#fviewcomment textarea:focus { outline: none; border-color: var(--color-accent, #1A1A1A); height: 84px; border-radius: 16px; }
#fviewcomment .bo_vc_w_wr { margin: 0; flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
#fviewcomment .bo_vc_w_info { display: flex; align-items: center; gap: 6px; }
#fviewcomment .frm_input { padding: 9px 12px; border: 1px solid var(--color-border, #ddd); border-radius: 999px; font-size: 0.82rem; }
#fviewcomment .btn_confirm { display: flex; align-items: center; gap: 12px; }
#fviewcomment .secret_cm { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--color-text-muted, #999); white-space: nowrap; }
#fviewcomment .secret_cm label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; margin: 0; }
#fviewcomment .btn_submit { padding: 12px 24px; border: none; border-radius: 999px; background: var(--color-accent, #1A1A1A); color: #fff; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
#fviewcomment .btn_submit:hover { opacity: 0.86; }

/* ============================================================
   글쓰기 (write) — .imm-write (깔끔한 구조·보이는 라벨·AOS)
   ============================================================ */
.imm-write { max-width: 720px; margin: 0 auto; padding: calc(var(--gnb-height, 64px) + 28px) 24px 70px; }
.imm-write-head { text-align: center; margin-bottom: 30px; }
.imm-write-title { font-family: var(--font-body); font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 500; margin: 0 0 8px; }
.imm-write-sub { font-size: 0.85rem; color: var(--color-text-secondary, #555); margin: 0; }
.imm-write-sub b { color: var(--color-text, #222); font-weight: 600; }

/* 게시 미리보기 — 실제(메인·갤러리) 메이슨리 타일과 동일 형태 */
.imm-wf { max-width: 280px; margin: 0 auto 34px; }
.imm-wf-cap { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted, #aaa); text-align: center; margin-bottom: 10px; }
.imm-wf-cap small { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.imm-wf-tile {
  position: relative; width: 100%; aspect-ratio: 4/5; border-radius: 14px; overflow: hidden;
  background: #d6d6d6 center/cover no-repeat; border: 1px dashed var(--color-border, #ddd);
}
.imm-wf-tile.has-img { border-style: solid; border-color: transparent; }
.imm-wf-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8f8f8f; font-size: 0.72rem; }
.imm-wf-tile.has-img .imm-wf-ph { display: none; }
.imm-wf-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 11px;
  font-size: 0.88rem; font-weight: 600; color: #fff; letter-spacing: -0.01em;
  background: linear-gradient(transparent, rgba(0,0,0,0.66));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.imm-wf-note { text-align: center; font-size: 0.74rem; color: var(--color-text-muted, #aaa); margin: 10px 0 0; }

.imm-field { margin-bottom: 22px; }
.imm-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--color-text, #222); margin-bottom: 8px; letter-spacing: 0.01em; }
.imm-label em { color: #e0483d; font-style: normal; }
.imm-label small { font-weight: 400; color: var(--color-text-muted, #999); margin-left: 6px; font-size: 0.75rem; }
.imm-hint { font-size: 0.76rem; color: var(--color-text-muted, #999); margin: 6px 0 0; }

.imm-write .frm_input, .imm-write select, .imm-write textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border, #ddd); border-radius: 10px;
  font-size: 0.92rem; box-sizing: border-box; background: var(--color-white, #fff); transition: border-color .2s ease;
}
.imm-write .frm_input:focus, .imm-write select:focus, .imm-write textarea:focus { outline: none; border-color: var(--color-accent, #1A1A1A); }
.imm-write textarea, .imm-write .wr_content textarea { min-height: 240px; resize: vertical; line-height: 1.7; }

.imm-field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.imm-field-grid > div { display: flex; flex-direction: column; }

/* 이미지 업로드 */
.imm-files { display: flex; flex-direction: column; gap: 10px; }
.imm-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imm-file-label { flex: 0 0 92px; font-size: 0.8rem; color: var(--color-text-secondary, #555); }
.imm-file:first-child .imm-file-label { color: var(--color-accent, #1A1A1A); font-weight: 600; }
.imm-write .frm_file { flex: 1; min-width: 200px; padding: 10px 12px; border: 1px dashed var(--color-border, #cfcfcf); border-radius: 10px; background: var(--color-surface, #fafafa); font-size: 0.84rem; }
.file_del { font-size: 0.78rem; color: var(--color-text-muted, #999); flex-basis: 100%; }

.bo_v_option { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0; font-size: 0.85rem; }
.bo_v_option label { cursor: pointer; }

/* 임시저장 (팝업 기본 숨김) */
#autosave_wrapper { position: relative; }
.imm-autosave-btn { margin-top: 8px; padding: 6px 12px; border: 1px solid var(--color-border, #ddd); border-radius: 8px; background: var(--color-white, #fff); color: var(--color-text-secondary, #555); font-size: 0.76rem; cursor: pointer; }
.imm-autosave-btn:hover { border-color: var(--color-text, #222); }
#autosave_pop { display: none; position: absolute; z-index: 10; top: 100%; left: 0; right: 0; margin-top: 6px; background: #fff; border: 1px solid var(--color-border, #ddd); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: 14px; }
#autosave_pop strong { display: block; font-size: 0.82rem; margin-bottom: 8px; }
#autosave_pop ul { list-style: none; padding: 0; margin: 0; }
#autosave_pop .autosave_close { margin-top: 8px; padding: 6px 14px; border: 1px solid var(--color-border, #ddd); border-radius: 8px; background: #fff; cursor: pointer; font-size: 0.78rem; }

/* 버튼 */
.imm-write-actions { display: flex; gap: 10px; justify-content: center; margin-top: 32px; }
.imm-btn-cancel { padding: 13px 30px; border-radius: 999px; border: 1px solid var(--color-border, #ddd); color: var(--color-text-secondary, #555); font-size: 0.9rem; transition: var(--transition, .2s ease); }
.imm-btn-cancel:hover { border-color: var(--color-text, #222); color: var(--color-text, #222); }
.imm-btn-submit { padding: 13px 34px; border-radius: 999px; border: none; background: var(--color-accent, #1A1A1A); color: #fff; font-size: 0.9rem; cursor: pointer; transition: var(--transition, .2s ease); }
.imm-btn-submit:hover { opacity: 0.86; }

@media (max-width: 600px) { .imm-write { padding-left: 16px; padding-right: 16px; } .imm-file-label { flex-basis: 100%; } }
