body {
  /* 윗/아랫첨자 특수 문자(ₖ, ᵤ 등)가 깨지지 않도록
     심벌/수학 폰트를 폴백으로 추가 */
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Segoe UI Symbol", "Cambria Math", sans-serif;
  font-size: 15px;
}

.main-wrapper {
  margin-top: 20px;
  margin-bottom: 32px;
}

table {
  table-layout: fixed;
}

th,
td {
  vertical-align: top;
}
 
.tag {
  color: rgb(0, 0, 255);
}

.num {
  color: rgb(0, 128, 0);
}

.src-only {
  color: rgb(255, 0, 0);
  background: #e0e0e0;
}

.tgt-only {
  color: rgb(255, 165, 0);
}

.tgt-num {
  color: rgb(255, 0, 0);
  background: #e0e0e0;
}
 
/* 문서 비교용 diff 하이라이트 (배경 강조) */
.doc-diff {
  background-color: rgba(0, 123, 255, 0.25);
  border-radius: 2px;
} 

.controls {
  margin: 12px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* 색상/커스텀 설정 패널을 카드 느낌으로 정리 */
#colorConfig {
  margin-top: 8px;
  max-width: 100%;
  display: none;
  gap: 8px;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  padding: 12px 16px 14px;
}

#colorConfig .color-row {
  /* 한 줄에 라벨 / 글자색 / 배경색 / 볼드를 “테이블 행”처럼 4칸으로 배치 */
  display: table;
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px 0; /* 셀 사이 가로 간격 */
}

/* 각 요소를 table-cell 로 만들어 항상 같은 행에 유지 */
#colorConfig .color-row > label:first-child,
#colorConfig .color-row > input[type="color"],
#colorConfig .color-row > .cell-bg,
#colorConfig .color-row > .cell-bold {
  display: table-cell;
  vertical-align: middle;
}

/* 첫 번째 라벨(설명 텍스트)은 고정 폭 + 줄바꿈 방지 */
#colorConfig .color-row > label:first-child {
  width: 220px;
  white-space: nowrap;
}

/* 글자색 컬러피커는 고정 폭 */
#colorConfig .color-row > input[type="color"] {
  width: 60px;
}

/* 배경색 영역은 남는 폭을 사용 */
#colorConfig .color-row > .cell-bg {
  width: 100%;
}

#colorConfig label {
  font-weight: 600;
  font-size: 13px;
}

#colorConfig input[type="color"] {
  padding: 0;
  width: 56px;
  height: 32px;
  border: none;
  background: transparent;
}

#colorConfig .cell-bg {
  display: flex;
  align-items: center;
  gap: 8px;
}

#colorConfig .cell-bg label {
  font-weight: 400;
}

#colorConfig .cell-bold {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
  font-size: 13px;
}

#colorConfig .tab-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 6px;
}

#colorConfig .tab-bar button {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

#colorConfig .tab-bar button.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

#colorConfig .tab-pane {
  display: none;
}

#colorConfig .tab-pane.active {
  display: grid;
  gap: 8px;
}

#customMapBox {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

#customMapBox .row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 120px 140px 80px;
  gap: 8px;
  align-items: center;
}

#customMapBox input[type="text"] {
  padding: 6px 8px;
  font-size: 13px;
}

#customMapBox input[type="color"] {
  width: 56px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
}

#customMapBox .desc {
  font-size: 12px;
  color: #555;
}

#customMapList {
  display: grid;
  gap: 6px;
}

#customMapList .item {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr auto 70px;
  gap: 8px;
  align-items: center;
}

#customMapList .item input[type="text"] {
  font-size: 13px;
}

#customMapList .chip {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: 12px;
}

#customMapList button {
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
}

#result col.id-col {
  width: 7%;
}

#result col.src-col {
  width: 46%;
}

#result col.tgt-col {
  width: 47%;
}
 
