/* File: /plugin/editor/jjeditor/assets/css/jjeditor.table.css
 * JJEditor Table — 모든 테이블 관련 스타일 통합 (버블 + 그리드 + 리사이즈 + Ops)
 * 목적: 에디터에서 보이는 테이블/셀의 선 스타일(색/굵기/스타일)을 뷰에서도 **동일하게** 재현
 * - 뷰에서는 인라인(border-*)이 존재하면 그 값을 100% 존중
 * - 인라인이 없는 셀만 기본 1px 실선(#666) 적용
 * - 행높이 차이를 줄이기 위해 line-height, 내부 블록 마진을 정규화
 * - 수직 정렬은 요청대로 **middle**로 통일
 */

:root{
  --jj-btnbar-h: 0px;
  --jj-tbl-popup-zindex: 2147482100;
  --jj-tbl-dock-zindex: 2147482000;
  --jj-tbl-edgepad-zindex: 2147481600;
  --jj-tbl-menu-zindex: 2147481700;
  --jj-tbl-grid-zindex: 2147483000;  /* 그리드 픽커 최상위 */
  --jj-tbl-tip-zindex: 2147483001;   /* 툴팁 최상위 */
}

/* ====== 테이블 기본 ====== */
table.jjtbl,
.jj-editor table,
.jj-view table{
  /* dashed/double 보존을 위해 반드시 separate */
  border-collapse: separate !important;
  border-spacing: 0;
  table-layout: auto;
  /* 🔧 수정: width: 100% 제거 - 명시적 폭이 없는 테이블만 100%로 */
  position: relative;
}

/* 조절 이력 없는 테이블만 100% 적용 */
#bo_v_con table.jjtbl:not([data-jj-width-mode="explicit"]):not(.jjtbl--fixed),
#bo_v_con .jj-view table:not([data-jj-width-mode="explicit"]):not(.jjtbl--fixed) {
  width: 100%;
  min-width: auto;
  max-width: none;
  margin: 0;
}

/* 조절 이력 있는 테이블은 인라인/데이터 폭을 존중 */
#bo_v_con table.jjtbl[data-jj-width-mode="explicit"],
#bo_v_con table.jjtbl.jjtbl--fixed {
  width: auto; /* 인라인 style.width 또는 하이드레이션 복원값 우선 */
}

/* 공통 기본 박스/타이포(테두리는 아래의 :not([style*="border"])에서만 기본값 적용) */
table.jjtbl td, table.jjtbl th,
.jj-editor table td, .jj-editor table th,
.jj-view table td, .jj-view table th {
  padding: 8px;
  word-break: break-word;
  background-clip: padding-box !important;
  background-origin: padding-box !important;
  position: relative;
  box-sizing: border-box;
  vertical-align: middle;            /* ✅ 요청: 모두 middle */
  min-height: 24px !important;
  line-height: 1.4 !important;
}

/* ------------------------------------------------------------------
 * (중요) 기본 테두리는 "인라인(border*)"이 없을 때에만 적용
 * ------------------------------------------------------------------ */
/* 에디터 */
.jj-editor table.jjtbl td:not([style*="border"]), .jj-editor table.jjtbl th:not([style*="border"]),
.jj-editor .jj-view table td:not([style*="border"]), .jj-editor .jj-view table th:not([style*="border"]) {
  border: 1px solid #666;
}
/* 뷰 */
#bo_v_con table.jjtbl td:not([style*="border"]), #bo_v_con table.jjtbl th:not([style*="border"]),
#bo_v_con .jj-view table td:not([style*="border"]), #bo_v_con .jj-view table th:not([style*="border"]) {
  border-color: #666;
  border-width: 1px;
  border-style: solid;
  min-height: 24px;
  line-height: 1.4;
  padding: 8px;
}
/* 인라인(border*)이 존재하는 셀은 그 값을 100% 존중 (no-op) */
#bo_v_con table.jjtbl td[style*="border"],
#bo_v_con table.jjtbl th[style*="border"],
#bo_v_con .jj-view table td[style*="border"],
#bo_v_con .jj-view table th[style*="border"] {}

/* (에디터 전용) 셀 테두리 CSS 변수 기본값 */
.jj-editor table.jjtbl td,
.jj-editor table.jjtbl th {
  --jj-border-color: #666;
  --jj-border-width: 1px;
  --jj-border-style: solid;
}

/* ====== 정렬 (도크 버튼 연동) ====== */
table.jjtbl.jj-align-left, .jj-editor table.jj-align-left, .jj-view table.jj-align-left{ margin-left:0; margin-right:auto; }
table.jjtbl.jj-align-center, .jj-editor table.jj-align-center, .jj-view table.jj-align-center{ margin-left:auto; margin-right:auto; }
table.jjtbl.jj-align-right, .jj-editor table.jj-align-right, .jj-view table.jj-align-right{ margin-left:auto; margin-right:0; }

/* ====== 테이블 Ops 작업 관련 스타일 ====== */
/* (편집 중 보조 효과 — 뷰에서는 모두 비활성화 아래쪽 참조) */
.jj-cell-merged { transition: all 0.3s ease; }
.jj-new-row { transition: background-color 0.5s ease; }
.jj-new-cell { transition: all 0.4s ease; }
.jj-cell-splitting { transition: all 0.3s ease; }
.jj-split-cell { animation: jj-cell-highlight 0.8s ease; }
.jj-split-row { border-top: 2px dashed #fdba74 !important; }

.jj-cell-removing { opacity: 0.7; animation: jj-cell-remove 0.3s ease forwards; }
.jj-row-removing { opacity: 0.6; animation: jj-row-remove 0.4s ease forwards; }

.jj-colspan-increased, .jj-rowspan-increased {}
.jj-colspan-decreased {}
.jj-equalized-row {}
.jj-equalized-col {}

.jj-table-updating { pointer-events: none; }
.jj-table-updating td, .jj-table-updating th { transition: all 0.2s ease; }

@keyframes jj-cell-highlight { 0% { background-color: rgba(249,115,22,0.2); } 100% { background-color: rgba(249,115,22,0.08); } }
@keyframes jj-cell-remove { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(0.8); opacity: 0; } }
@keyframes jj-row-remove  { 0% { transform: scaleY(1); opacity: 0.6; } 100% { transform: scaleY(0.3); opacity: 0; } }

/* 선택 강조 */
.jj-tbl-option.selected {
  background: #e0e7ff !important;
  border-left: 3px solid #3b82f6 !important;
  font-weight: 600 !important;
}
table.jjtbl td.jj-cell-selected, table.jjtbl th.jj-cell-selected,
table.jjtbl td.__jj_sel,       table.jjtbl th.__jj_sel,
.jj-editor table .jj-cell-selected {
  outline:2px solid #3b82f6 !important;
  outline-offset:-2px !important;
  background:rgba(59,130,246,.08) !important;
  transition: background-color 0.2s ease;
}
table.jjtbl.__jj_dragging td, table.jjtbl.__jj_dragging th{ cursor:crosshair!important; }

/* ====== 에디터/뷰 공통: 하단 도크 ====== */
#jj_editor_tbar{
  position:fixed; left:0; right:0; bottom:0; z-index:var(--jj-tbl-dock-zindex);
  background:rgba(255,255,255,.98); border-top:1px solid #e5e7eb; box-shadow:0 -8px 22px rgba(0,0,0,.06);
  display:none;
}
#jj_editor_tbar .inner{ max-width:1080px; margin:0 auto; padding:8px 12px; display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:nowrap }
#jj_editor_tbar .grp{ display:flex; gap:6px; align-items:center }
#jj_editor_tbar .sep{ min-width:1px; width:1px; height:24px; background:#d1d5db; margin:0 6px }

#jj_editor_tbar .btn{
  min-width:30px; height:30px; border:1px solid #e5e7eb; border-radius:6px; background:#f9fafb;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer; user-select:none;
  padding:0 8px; font-size:12px; font-weight:500;
}
#jj_editor_tbar .btn:hover{ background:#eef2ff; border-color:#c7d2fe }
#jj_editor_tbar .btn.on{ background:#e0e7ff; border-color:#a5b4fc }
#jj_editor_tbar .btn.color-on{ background:#dbeafe; border-color:#93c5fd }
#jj_editor_tbar .btn:disabled{ opacity:0.5; cursor:not-allowed }
#jj_editor_tbar .btn:disabled:hover{ background:#f9fafb; border-color:#e5e7eb }
#jj_editor_tbar .btn svg{ width:18px; height:18px; display:block }
#jj_editor_tbar .btn .fa-solid{
  font-size:14px!important; width:18px!important; height:18px!important; display:flex!important;
  align-items:center!important; justify-content:center!important; margin:0!important;
}
#jj_editor_tbar input.bw{ width:56px; height:30px; border:1px solid #e5e7eb; border-radius:6px; padding:0 6px }

/* ====== 테이블 정렬 스타일 (수평만 제어: margin-inline 사용) ====== */
.jj-align-left  { margin-inline: 0 auto !important; }
.jj-align-center{ margin-inline: auto !important; }
.jj-align-right { margin-inline: auto 0 !important; }

.jj-align.on { background-color:#e3f2fd !important; color:#1976d2 !important; border-color:#90caf9 !important; }

/* ====== 테이블 버블 전용 스타일 ====== */
.jj_editor_tbl_color_pop{
  position:fixed; z-index:var(--jj-tbl-popup-zindex); background:#fff; border:1px solid #e5e7eb; border-radius:8px;
  padding:8px 10px; box-shadow:0 8px 22px rgba(0,0,0,.12); display:grid; grid-template-columns:repeat(8,18px); gap:6px
}
.jj_editor_tbl_color_pop .sw{ width:18px; height:18px; border:1px solid #d1d5db; border-radius:4px; cursor:pointer }
.jj_editor_tbl_color_pop .sw:hover{ outline:2px solid #60a5fa; outline-offset:1px }
.jj_editor_tbl_color_pop .sw.none{
  background:linear-gradient(45deg,#fff 48%,transparent 48%),linear-gradient(45deg,transparent 52%,#fff 52%),#fff; position:relative;
  grid-column: span 2; width:auto; display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:bold; color:#666; border:2px solid #fff; text-shadow:0 0 2px #fff; box-shadow:0 0 0 1px #d1d5db;
}
.jj_editor_tbl_color_pop .sw.none:after{
  content:""; position:absolute; inset:0; background:repeating-linear-gradient(45deg,rgba(0,0,0,.15),rgba(0,0,0,.15) 2px,transparent 2px,transparent 6px); z-index:-1
}
.jj_editor_tbl_color_pop .recent{ grid-column:1/-1; display:flex; gap:6px; padding-bottom:6px; border-bottom:1px solid #f3f4f6; margin-bottom:6px }

/* 확장 팝업(사이즈/인터렉션) */
.jj_editor_tbl_color_pop{ display:grid; grid-template-columns:repeat(8,1fr); gap:4px; padding:8px; border:1px solid #d1d5db; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.jj_editor_tbl_color_pop .recent{ grid-column:1 / -1; display:grid; grid-template-columns:repeat(8,1fr); gap:4px; margin-bottom:8px; padding-bottom:8px; border-bottom:1px solid #e5e7eb; }
.jj_editor_tbl_color_pop .sw{ width:24px; height:24px; border-radius:4px; cursor:pointer; border:1px solid #e5e7eb; transition:transform .1s; position:relative; }
.jj_editor_tbl_color_pop .sw:hover{ transform:scale(1.1); border-color:#3b82f6; }
.jj_editor_tbl_color_pop .sw.none{
  background: linear-gradient(45deg,#ccc 25%,transparent 25%,transparent 75%,#ccc 75%,#ccc),
              linear-gradient(45deg,#ccc 25%,transparent 25%,transparent 75%,#ccc 75%,#ccc);
  background-size:8px 8px; background-position:0 0,4px 4px;
}

/* 커스텀 셀렉트 */
.jj-tbl-custom-select { position:relative; display:inline-block; z-index:calc(var(--jj-tbl-popup-zindex) + 10); }
.jj-tbl-select-trigger {
  background:#f8f9fa; border:1px solid #d1d5db; padding:6px 12px; border-radius:4px; cursor:pointer;
  display:flex; align-items:center; min-width:180px; justify-content:space-between; font-size:13px; width:180px; position:relative; z-index:calc(var(--jj-tbl-popup-zindex) + 11);
}
.jj-tbl-select-trigger:hover { background:#e5e7eb; border-color:#9ca3af; }
.jj-tbl-select-arrow { font-size:10px; color:#666; margin-left:8px; transition:transform 0.2s ease; }
.jj-tbl-custom-select.open .jj-tbl-select-arrow { transform:rotate(180deg); }
.jj-tbl-select-options{
  display:none; position:absolute; bottom:100%; left:0; right:0; background:#fff; border:1px solid #d1d5db; border-radius:4px;
  box-shadow:0 -2px 8px rgba(0,0,0,0.1); z-index:calc(var(--jj-tbl-popup-zindex) + 12); width:180px; max-height:200px; overflow-y:auto;
}
.jj-tbl-select-options.open{ display:block; }
.jj-tbl-option{ padding:8px 12px; cursor:pointer; display:flex; align-items:center; border-bottom:1px solid #f3f4f6; transition:background-color .15s ease; }
.jj-tbl-option:hover{ background:#f3f4f6; }
.jj-tbl-option:last-child{ border-bottom:none; }
.jj-tbl-option.selected{ background:#e0e7ff !important; border-left:3px solid #3b82f6 !important; font-weight:600 !important; }
.jj-tbl-style-icon{ display:inline-block; width:60px; height:16px; margin-right:8px; border-bottom:1px solid #333; position:relative; top:-2px; flex-shrink:0; }
.jj-tbl-style-icon.thin{ border-bottom-width:1px; border-bottom-style:solid; }
.jj-tbl-style-icon.medium{ border-bottom-width:2px; border-bottom-style:solid; }
.jj-tbl-style-icon.thick{ border-bottom-width:3px; border-bottom-style:solid; }
.jj-tbl-style-icon.dashed{ border-bottom-width:1px; border-bottom-style:dashed; }
.jj-tbl-style-icon.double{
  background: linear-gradient(to bottom, transparent 0%, transparent 45%, #333 45%, #333 55%, transparent 55%, transparent 100%);
  border-bottom:3px solid transparent;
}
.jj-tbl-style-icon.double-thick{
  background: linear-gradient(to bottom, transparent 0%, transparent 40%, #333 40%, #333 60%, transparent 60%, transparent 100%);
  border-bottom:4px solid transparent;
}
.jj-tbl-style-icon.transparent{
  border-bottom:1px solid transparent;
  background:linear-gradient(45deg,#ccc 25%,transparent 25%,transparent 75%,#ccc 75%,#ccc);
  background-size:4px 4px; background-position:0 0,2px 2px;
}
.jj-tbl-option-text{ font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }
.jj-tbl-bc-btn{ position:relative; overflow:hidden; }
.jj-tbl-bc-btn::after{ content:''; position:absolute; top:2px; right:2px; bottom:2px; left:2px; background-color:currentColor; opacity:.2; border-radius:2px; }
.jj-tbl-apply-btn.has-changes{ background:#3b82f6 !important; color:#fff !important; border-color:#2563eb !important; }
.jj-tbl-apply-btn:disabled{ opacity:.5; cursor:not-allowed !important; background:#f9fafb !important; color:#9ca3af !important; border-color:#e5e7eb !important; }

/* ====== 테이블 그리드 픽커 ====== */
.jj-tgrid{
  position:fixed; z-index:var(--jj-tbl-grid-zindex); background:#fff; border:1px solid #e5e7eb; border-radius:8px;
  padding:10px 12px; box-shadow:0 10px 25px rgba(0,0,0,.12);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  will-change:transform; transform:none !important; bottom:auto !important;
}
.jj-tgrid .grid{ display:grid; grid-template-columns:repeat(12,16px); grid-auto-rows:16px; gap:4px; }
.jj-tgrid .cell{ width:16px; height:16px; border:1px solid #d1d5db; border-radius:3px; background:#fafafa; cursor:pointer; }
.jj-tgrid .cell.on{ background:#93c5fd; border-color:#60a5fa; }
.jj-tgrid .hint{ margin-top:8px; font-size:12px; color:#6b7280; text-align:center; }
.jj-tgrid:focus{ outline:none; }

/* ====== 리사이즈 핸들 ====== */
.jj-rz-tip{
  position:fixed; z-index:var(--jj-tbl-tip-zindex); min-width:38px; height:26px; border-radius:13px;
  display:flex; align-items:center; justify-content:center;
  font:12px/1.0 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:rgba(17,24,39,.92); color:#fff; padding:0 10px; pointer-events:none;
  box-shadow:0 6px 18px rgba(0,0,0,.24);
}
.jj-rz-right-edge { position:absolute; right:-6px; top:0; bottom:0; width:12px; cursor:col-resize; z-index:3; background:transparent; }
.jj-rz-right-edge:hover::after, .jj-rz-right-edge:active::after{
  content:''; position:absolute; right:3px; top:20%; bottom:20%; width:2px; background:#3b82f6; border-radius:1px; opacity:.8;
}
.jj-rz-line{
  position:absolute; background:rgba(59,130,246,.35); box-shadow:inset 0 0 0 1px rgba(59,130,246,.9);
  pointer-events:none; z-index:2; transition: background .15s ease, box-shadow .15s ease;
}
.jj-rz-line.v{ top:0; bottom:0; width:3px; }
.jj-rz-line.h{ left:0; right:0; height:3px; }
.jj-rz-line.snapped{ background:rgba(34,197,94,.6) !important; box-shadow:inset 0 0 0 1px rgba(34,197,94,.9) !important; }

.jj-col-resize, .jj-row-resize{ cursor:col-resize; }
.jj-row-resize{ cursor:row-resize; }
.jj-noselect, .jj-noselect *{ user-select:none !important; }

.jj-editor .jj-after-table-area{ display:block; height:16px; }

/* ====== 컨테이너 ====== */
.jj-table-container { 
  position:relative; 
  display:inline-block; 
  max-width:100%;
  /* ✅ 뷰페이지에서 테이블 수평 스크롤 추가 */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* iOS에서 부드러운 스크롤 */
}

/* 뷰페이지에서만 적용 */
#bo_v_con .jj-table-container {
  display: block;
  width: 100%;
  /* ✅ 모든 스타일 제거 - 깔끔하게 */
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

/* 뷰페이지에서 테이블이 컨테이너를 벗어나지 않도록 */
#bo_v_con table.jjtbl,
#bo_v_con .jj-view table {
  min-width: auto;
  width: auto;
  max-width: none;
  margin: 0;
}

/* ✅ 스크롤바 완전 숨김 */
#bo_v_con .jj-table-container::-webkit-scrollbar {
  display: none;
}

#bo_v_con .jj-table-container {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* ====== EdgePad ====== */
.jj-ep-pad{
  position:fixed; z-index:var(--jj-tbl-edgepad-zindex); width:22px; height:22px; display:none; align-items:center; justify-content:center;
  background:#fff; border:1px solid #d1d5db; border-radius:6px; box-shadow:0 2px 8px rgba(0,0,0,.12); cursor:pointer;
}
.jj-ep-pad i{ font-size:14px; }
.jj-ep-pad:hover{ background:#f0f9ff; border-color:#93c5fd; }

.jj-ep-menu{
  position:fixed; z-index:var(--jj-tbl-menu-zindex); background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:6px 6px;
  box-shadow:0 12px 28px rgba(0,0,0,.18); display:flex; flex-direction:column; gap:2px; min-width:180px;
}
.jj-ep-menu .item{ display:flex; align-items:center; gap:8px; height:32px; padding:0 10px; border-radius:8px; cursor:pointer; font-size:13px; }
.jj-ep-menu .item:hover{ background:#f3f4f6; }
.jj-ep-menu .item.disabled{ opacity:.45; cursor:not-allowed; }
.jj-ep-menu .sep{ height:1px; background:#e5e7eb; margin:4px 0; }

/* ====== 리사이즈 핸들 정책 ====== */
.jj-editor .jj-rz-h, .jj-editor .jj-rz-line{ display:none!important }
table.jjtbl .jj-rz-h.nw, table.jjtbl .jj-rz-h.ne, table.jjtbl .jj-rz-h.sw{ display:none!important }
table.jjtbl .jj-rz-h.se{ display:block!important }

/* textarea 네이티브 리사이즈 금지 */
textarea{ resize:none!important }
.jj-editor textarea{ resize:none!important }

/* ====== 뷰페이지에서 편집용/임시 요소 완전 숨김 ====== */
#bo_v_con .jj-rz-right-edge,
#bo_v_con .jj-cell-selected,
#bo_v_con .jj-rz-line.v,
#bo_v_con .jj-rz-line.h,
#bo_v_con .jj-rz-h,
#bo_v_con .jj-ep-pad,
#bo_v_con .jj-ep-menu,
#bo_v_con .jj-rz-tip,
#bo_v_con .jj-table-container .jj-rz-right-edge,
#bo_v_con .jj-table-container .jj-rz-line,
#bo_v_con .jj-split-row,
#bo_v_con .jj-split-cell,
#bo_v_con .jj-cell-splitting {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 뷰에서 혹시 남더라도 애니메이션 완전 차단 */
#bo_v_con .jj-split-cell,
#bo_v_con .jj-new-cell,
#bo_v_con .jj-cell-removing,
#bo_v_con .jj-row-removing { animation: none !important; }

/* 뷰페이지에서 리사이즈 커서 비활성화 */
#bo_v_con table.jjtbl,
#bo_v_con table.jjtbl td,
#bo_v_con table.jjtbl th,
#bo_v_con table.jjtbl * { cursor: default !important; }

/* 뷰페이지에서 리사이즈 관련 클래스 비활성화 */
#bo_v_con .jj-col-resize,
#bo_v_con .jj-row-resize,
#bo_v_con .jj-noselect { cursor: default !important; user-select: auto !important; }

/* 뷰페이지에서 테이블 호버 시 커서 변경 방지 */
#bo_v_con table.jjtbl:hover,
#bo_v_con table.jjtbl td:hover,
#bo_v_con table.jjtbl th:hover { cursor: default !important; }

/* 뷰페이지에서 리사이즈 핸들러 호버 효과 제거 */
#bo_v_con .jj-rz-right-edge:hover,
#bo_v_con .jj-rz-right-edge:active { background: transparent !important; border-color: transparent !important; }
#bo_v_con .jj-rz-right-edge:hover::after,
#bo_v_con .jj-rz-right-edge:active::after { display: none !important; }

/* ====== (중요 재보강) 일부 스킨이 collapse를 강제하는 경우 대응 ====== */
table.jjtbl, .jj-editor table, .jj-view table {
  border-collapse: separate !important;
  table-layout: auto !important;
}

/* 기본 셀 박스(인라인이 있으면 인라인 우선) */
table.jjtbl td, table.jjtbl th,
.jj-editor table td, .jj-editor table th {
  box-sizing: border-box !important;
  /* 기본 실선은 위의 :not([style*="border"]) 규칙에서만 지정 */
  /* 여긴 padding/align만 유지 */
  padding: 8px;
  vertical-align: middle;
}

/* 에디터 전용: 테이블 아래 여백 6px */
.jj-editor table.jjtbl{
  margin-bottom: var(--jj-table-gap-after, 18px) !important;
  margin-top: -1.5px;
}

/* 표 뒤 자동 단락과의 이중 간격 방지 */
.jj-editor table.jjtbl + p{
  margin-top: 0;
}

/* 공통 타이포 메트릭 변수(필요 시 프로젝트 스킨에서 한 번에 조정 가능) */
.jj-editor,
#bo_v_con{
  --jj-cell-fz: 16px;   /* 필요 시 15px/14px로 내려 보정 가능 */
  --jj-cell-lh: 1.4;    /* 현재 설정과 동일 */
  --jj-cell-pad-y: 8px; /* 상하 패딩 */
}

/* 에디터·뷰 “모두” 표 셀의 폰트/라인/패딩을 동일 변수로 고정 */
.jj-editor table.jjtbl td,
.jj-editor table.jjtbl th,
#bo_v_con table.jjtbl td,
#bo_v_con table.jjtbl th{
  font-size: var(--jj-cell-fz) !important;
  line-height: var(--jj-cell-lh) !important;
  padding-top: var(--jj-cell-pad-y) !important;
  padding-bottom: var(--jj-cell-pad-y) !important;
  /* 좌우 패딩은 기존 8px 유지(필요 시 변수화 가능) */
}

/* ====== (행높이 정규화) 뷰의 셀 내부 블록요소 여백 제거 ====== */
#bo_v_con table.jjtbl td > p,
#bo_v_con table.jjtbl th > p,
#bo_v_con table.jjtbl td > h1,
#bo_v_con table.jjtbl td > h2,
#bo_v_con table.jjtbl td > h3,
#bo_v_con table.jjtbl td > h4,
#bo_v_con table.jjtbl td > h5,
#bo_v_con table.jjtbl td > h6,
#bo_v_con table.jjtbl th > h1,
#bo_v_con table.jjtbl th > h2,
#bo_v_con table.jjtbl th > h3,
#bo_v_con table.jjtbl th > h4,
#bo_v_con table.jjtbl th > h5,
#bo_v_con table.jjtbl th > h6 { margin: 0; }

#bo_v_con table.jjtbl td > *:first-child,
#bo_v_con table.jjtbl th > *:first-child { margin-top: 0 !important; }
#bo_v_con table.jjtbl td > *:last-child,
#bo_v_con table.jjtbl th > *:last-child { margin-bottom: 0 !important; }

/* 뷰 내 테이블의 줄간격을 에디터와 맞춤 */
#bo_v_con table.jjtbl { font-size: inherit; line-height: 1.4; }