.emc-root {
  --emc-ink: #173a35;
  --emc-muted: #647b75;
  --emc-line: #d5e4df;
  --emc-soft: #f0f7f5;
  --emc-accent: #10796e;
  min-width: 0;
  color: var(--emc-ink);
}
.emc-root *, .emc-editor * { box-sizing: border-box; }
.emc-root button, .emc-root input, .emc-root select, .emc-editor button, .emc-editor input { font: inherit; }
.emc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--emc-line);
  border-radius: 14px;
  background: var(--emc-soft);
}
.emc-toolbar-fields, .emc-toolbar-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.emc-toolbar label { display: grid; gap: 5px; color: var(--emc-muted); font-size: 12px; }
.emc-toolbar input, .emc-toolbar select {
  min-height: 40px;
  min-width: 140px;
  padding: 0 12px;
  border: 1px solid var(--emc-line);
  border-radius: 9px;
  color: var(--emc-ink);
  background: #fff;
}
.emc-toolbar input { min-width: 240px; }
.emc-toolbar button, .emc-preview-bar button { min-height: 40px; }
.emc-toolbar[hidden], .emc-selected-panel[hidden], .emc-selected-preview[hidden] { display: none !important; }
.emc-status { margin: 9px 3px 12px; color: var(--emc-muted); font-size: 12px; }
.emc-list {
  overflow: hidden;
  border: 1px solid var(--emc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 65, 57, .04);
}
.emc-list[hidden], .emc-preview[hidden] { display: none !important; }
.emc-list-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--emc-line);
}
.emc-list-head h3 { margin: 0; font-size: 19px; }
.emc-list-head p, .emc-list-head small { margin: 4px 0 0; color: var(--emc-muted); font-size: 12px; }
.emc-table-scroll { overflow-x: auto; }
.emc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.emc-table th, .emc-table td { padding: 12px; border-bottom: 1px solid var(--emc-line); text-align: left; white-space: nowrap; }
.emc-table th { color: var(--emc-muted); background: var(--emc-soft); font-weight: 600; }
.emc-table tr:last-child td { border-bottom: 0; }
.emc-table tr[draggable="true"] { cursor: grab; }
.emc-table tr.emc-dragging { opacity: .45; cursor: grabbing; }
.emc-table .emc-phone { font-variant-numeric: tabular-nums; }
.emc-order-heading, .emc-order-cell { width: 105px; }
.emc-order-cell { white-space: nowrap; }
.emc-drag-handle { color: #10796e; margin-right: 5px; font-size: 17px; line-height: 1; vertical-align: middle; }
.emc-move-buttons { display: inline-flex; gap: 3px; vertical-align: middle; }
.emc-move-buttons button { min-width: 30px; min-height: 30px; padding: 0 6px; line-height: 1; }
.emc-actions { display: flex; align-items: center; gap: 6px; }
.emc-edit-button, .emc-hide-button { white-space: nowrap; padding: 7px 10px; }
.emc-hide-button { color: #a34c3e; border-color: #efd1cc; }
.emc-root button:disabled { opacity: .45; cursor: not-allowed; }
.emc-hidden-section { padding: 12px 16px; border-top: 1px solid var(--emc-line); }
.emc-hidden-section[hidden] { display: none !important; }
.emc-hidden-section summary { color: var(--emc-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.emc-hidden-section summary span { color: var(--emc-muted); font-weight: normal; }
.emc-hidden-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--emc-line); font-size: 12px; }
.emc-hidden-person:last-child { border-bottom: 0; }
.emc-hidden-person button { white-space: nowrap; min-height: 34px; }
.emc-empty { text-align: center !important; color: var(--emc-muted); }
.emc-privacy { padding: 12px 16px; color: var(--emc-muted); background: var(--emc-soft); font-size: 11px; }
.emc-preview-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 8px 0 14px; color: var(--emc-muted); font-size: 12px; }
.emc-preview-pages { display: grid; justify-content: center; gap: 20px; overflow-x: auto; padding: 16px; border-radius: 14px; background: #e8f0ed; }
.emc-print-page {
  width: 210mm;
  height: 297mm;
  padding: 12mm;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  color: #172c28;
  background: #fff;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 10px;
  box-shadow: 0 12px 30px rgba(10, 32, 27, .13);
  overflow: hidden;
}
.emc-print-table { width: 100%; flex: 0 0 auto; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 10.5px; line-height: 1.25; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.emc-print-table th, .emc-print-table td { height: 9mm; padding: 1.5mm 1.3mm; border-bottom: 1px solid #d4e1dd; text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.emc-print-table th { height: 9mm; color: #345951; background: #eef5f2; font-weight: 600; }
.emc-print-table td { height: var(--emc-print-row-height, 9mm); white-space: normal; }
.emc-print-table tr.emc-print-department-start > td { border-top: 2px solid #2f675d; background: #f6faf8; }
.emc-print-table tr.emc-print-department-start > td:nth-child(2) { color: #234e45; font-weight: 600; }
.emc-print-table td.emc-print-department-head-name { font-weight: 650; }
.emc-print-table .emc-phone { white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.emc-print-table tr { break-inside: avoid; page-break-inside: avoid; }
.emc-print-footer { display: flex; flex: 0 0 auto; justify-content: space-between; gap: 8mm; margin-top: auto; padding-top: 3mm; border-top: 1px solid #cfdcd7; color: #657a74; font-size: 9px; }
.emc-print-footer p { max-width: 150mm; margin: 0; }
.emc-print-footer span { white-space: nowrap; }
.emc-editor { width: min(520px, calc(100vw - 24px)); max-height: min(700px, calc(100vh - 24px)); padding: 0; border: 1px solid #d5e4df; border-radius: 16px; color: #173a35; background: #fff; box-shadow: 0 22px 56px rgba(8, 38, 32, .2); }
.emc-editor::backdrop { background: rgba(8, 38, 32, .45); }
.emc-editor form { padding: 22px; overflow-y: auto; }
.emc-editor-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid #d5e4df; }
.emc-editor-head p { margin: 0 0 4px; color: #10796e; font-size: 12px; }
.emc-editor-head h2 { margin: 0 0 4px; font-size: 22px; }
.emc-editor-head small { color: #647b75; }
.emc-editor-head button { border: 0; background: #eff7f4; color: #173a35; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.emc-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; padding: 19px 0; }
.emc-editor-fields label { display: grid; gap: 6px; color: #4c6963; font-size: 12px; }
.emc-editor-fields input { width: 100%; min-height: 41px; padding: 0 11px; border: 1px solid #d5e4df; border-radius: 9px; color: #173a35; background: #fff; }
.emc-editor-note, .emc-editor-status { margin: 0 0 10px; color: #647b75; font-size: 12px; }
.emc-editor-status:not(:empty) { color: #a54c24; }
.emc-editor-actions { display: flex; justify-content: end; gap: 8px; }
.emc-editor-actions button { min-height: 40px; }
.emc-print-frame { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.emc-selected-panel { overflow: hidden; border: 1px solid var(--emc-line); border-radius: 14px; background: #fff; }
.emc-selected-head { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--emc-line); }
.emc-selected-head p { margin: 0 0 4px; color: var(--emc-accent); font-size: 11px; font-weight: 700; }
.emc-selected-head h3 { margin: 0 0 5px; font-size: 20px; }
.emc-selected-head small { color: var(--emc-muted); font-size: 12px; }
.emc-selected-head button { min-height: 38px; }
.emc-selected-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px 20px; }
.emc-selected-step { min-width: 0; border: 1px solid var(--emc-line); border-radius: 12px; background: #fbfefd; }
.emc-selected-step-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px; border-bottom: 1px solid var(--emc-line); }
.emc-selected-step-head h4 { margin: 0; font-size: 14px; }
.emc-selected-step-head h4 span { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 6px; border-radius: 7px; color: #fff; background: var(--emc-accent); font-size: 12px; }
.emc-selected-step-head > div { display: flex; flex-wrap: wrap; gap: 5px; }
.emc-selected-step-head button { min-height: 32px; padding: 5px 8px; font-size: 11px; }
.emc-selected-departments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 320px; overflow-y: auto; padding: 12px; }
.emc-selected-department, .emc-selected-person { display: flex; align-items: center; min-width: 0; gap: 8px; padding: 9px 10px; border: 1px solid var(--emc-line); border-radius: 9px; background: #fff; cursor: pointer; }
.emc-selected-department input, .emc-selected-person input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--emc-accent); }
.emc-selected-department span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.emc-selected-department small { margin-left: auto; flex: 0 0 auto; color: var(--emc-muted); font-size: 11px; }
.emc-selected-people { display: grid; align-content: start; gap: 7px; max-height: 360px; overflow-y: auto; padding: 12px; }
.emc-selected-person > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.emc-selected-person strong { overflow-wrap: anywhere; font-size: 12px; }
.emc-selected-person small { color: var(--emc-muted); overflow-wrap: anywhere; font-size: 11px; }
.emc-selected-person-phone { margin-left: auto; color: var(--emc-ink); overflow-wrap: anywhere; text-align: right; font-variant-numeric: tabular-nums; font-size: 11px; }
.emc-selected-count { margin: 10px 12px 0; color: var(--emc-muted); font-size: 12px; }
.emc-selected-empty { grid-column: 1 / -1; margin: 4px 0; padding: 18px 8px; color: var(--emc-muted); text-align: center; font-size: 12px; }
.emc-selected-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 20px 12px; }
.emc-selected-actions button { min-height: 40px; }
.emc-selected-layout-note { margin: -4px 20px 11px; color: var(--emc-muted); font-size: 11px; }
.emc-selected-status { min-height: 16px; margin: 0 20px 10px; color: #a54c24; font-size: 12px; }
.emc-selected-preview { padding: 12px 20px 20px; }
.emc-selected-preview-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; color: var(--emc-muted); font-size: 12px; }
.emc-selected-preview-pages { display: grid; justify-content: center; gap: 16px; overflow-x: auto; padding: 14px; border-radius: 12px; background: #e8f0ed; }
.emc-selected-sheet { display: grid; grid-template-columns: repeat(2, 105mm); grid-template-rows: repeat(2, 148mm); width: 210mm; height: 296mm; box-sizing: border-box; color: #173a35; background: #fff; box-shadow: 0 12px 30px rgba(10, 32, 27, .13); font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.emc-selected-sheet *, .emc-selected-sheet *::before, .emc-selected-sheet *::after { box-sizing: border-box; }
.emc-selected-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 5mm 6mm; border: 1px dashed #9ebcb3; overflow: hidden; }
.emc-selected-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 3mm; min-height: 8mm; padding-bottom: 2mm; border-bottom: 1px solid #2f675d; }
.emc-selected-card-head small { min-width: 0; color: #647b75; overflow-wrap: anywhere; font-size: 8.5px; }
.emc-selected-card-head span { align-self: end; white-space: nowrap; color: #647b75; font-size: 8px; }
.emc-selected-card-people { display: flex; flex: 1 1 auto; flex-direction: column; justify-content: flex-start; min-height: 0; margin-bottom: 1px; }
.emc-selected-card-person { display: grid; flex: 0 0 auto; align-content: center; gap: calc(.5mm * var(--emc-contact-scale, 1)); min-height: 0; padding: calc(1.2mm * var(--emc-contact-scale, 1)) 0 calc(1.8mm * var(--emc-contact-scale, 1)); border-bottom: 1px solid #d4e1dd; font-size: calc(10px * var(--emc-contact-scale, 1)); line-height: 1.2; overflow-wrap: anywhere; }
.emc-selected-measure .emc-selected-card-people { display: block; }
.emc-selected-measure .emc-selected-card-person { display: grid; flex: 0 0 auto; }
.emc-selected-card-person.emc-selected-card-department-start { border-top: 1.5px solid #2f675d; background: #f6faf8; }
.emc-selected-card-identity { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5mm; align-items: baseline; }
.emc-selected-card-identity strong { min-width: 0; font-size: calc(12px * var(--emc-contact-scale, 1)); font-weight: 550; overflow-wrap: anywhere; }
.emc-selected-card-identity strong.emc-selected-card-head-name { font-weight: 700; }
.emc-selected-card-identity span { min-width: 0; color: #345951; overflow-wrap: anywhere; }
.emc-selected-card-contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2mm; color: #647b75; }
.emc-selected-card-contact b { min-width: 0; color: #173a35; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; font-size: calc(11px * var(--emc-contact-scale, 1)); font-weight: 600; }
.emc-selected-card-footer { display: flex; justify-content: space-between; gap: 1mm; margin-top: auto; padding-top: 1.5mm; border-top: 1px solid #cfdcd7; color: #647b75; font-size: 7.5px; }
.emc-selected-card-footer span:first-child { min-width: 0; overflow-wrap: anywhere; }
.emc-selected-card-footer span:last-child { white-space: nowrap; }
.emc-layout-editor { margin: 0 20px 20px; padding: 16px; border: 1px solid #bed8d0; border-radius: 12px; background: #f3f8f6; }
.emc-layout-editor[hidden] { display: none !important; }
.emc-layout-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.emc-layout-tools > div { flex: 1 1 100%; }
.emc-layout-tools h4 { margin: 0 0 6px; font-size: 16px; }
.emc-layout-tools p, .emc-layout-help { margin: 0; color: #526e67; font-size: 12px; line-height: 1.5; }
.emc-layout-tools label { display: grid; gap: 5px; font-size: 12px; }
.emc-layout-tools input { width: 90px; min-height: 36px; padding: 7px 10px; border: 1px solid #bbd4cc; border-radius: 8px; }
.emc-layout-tools button { min-height: 36px; padding: 8px 12px; border: 1px solid #bbd4cc; border-radius: 8px; background: #fff; color: #244b40; cursor: pointer; }
.emc-layout-help { margin: 12px 0; }
.emc-layout-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 12px; align-items: start; }
.emc-layout-page { min-width: 0; border: 1px solid #c4d9d2; border-radius: 10px; background: #fff; overflow: hidden; }
.emc-layout-page > header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px; background: #e6f2ed; font-size: 13px; }
.emc-layout-page > header span { margin-left: auto; color: #527167; font-size: 11px; }
.emc-layout-drop { min-height: 65px; padding: 6px; }
.emc-layout-person { display: flex; align-items: center; gap: 7px; padding: 8px 4px; border-bottom: 1px solid #e0eae6; cursor: grab; }
.emc-layout-person:last-child { border-bottom: 0; }
.emc-layout-person.emc-dragging { opacity: .4; }
.emc-layout-grip { color: #73968a; }
.emc-layout-name { display: grid; gap: 3px; flex: 1; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.emc-layout-name small { color: #607a70; font-size: 10px; }
.emc-layout-moves { display: flex; align-items: center; gap: 3px; }
.emc-layout-moves button, .emc-layout-moves select { min-height: 30px; min-width: 27px; padding: 4px; font-size: 11px; border: 1px solid #cadbd4; border-radius: 6px; background: #fff; color: #244b40; }
.emc-layout-empty { padding: 12px; color: #688579; font-size: 12px; text-align: center; }
.emc-layout-overflow { border-color: #c96f36; }
.emc-layout-overflow > header { background: #fff0e3; }
.emc-layout-drop-active { outline: 2px solid #178a79; outline-offset: 2px; }
.emc-layout-error { color: #9b451b; margin: 10px 0 0; font-size: 12px; }
@media (max-width: 720px) {
  .emc-toolbar-fields, .emc-toolbar-actions { width: 100%; }
  .emc-toolbar label { flex: 1 1 100%; }
  .emc-toolbar input, .emc-toolbar select { width: 100%; min-width: 0; }
  .emc-toolbar-actions button { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .emc-toolbar-actions button:last-child { flex-basis: 100%; }
  .emc-list-head { align-items: start; flex-direction: column; }
  .emc-table-scroll { overflow: visible; }
  .emc-table, .emc-table tbody { display: block; width: 100%; }
  .emc-table thead { display: none; }
  .emc-table tbody { padding: 10px; }
  .emc-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    margin-bottom: 10px;
    padding: 11px;
    border: 1px solid var(--emc-line);
    border-radius: 11px;
    background: #fff;
    cursor: auto;
  }
  .emc-table tr:last-child { margin-bottom: 0; }
  .emc-table td { display: block; min-width: 0; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .emc-table td:nth-child(1) { grid-column: 2; grid-row: 1; width: auto; text-align: right; }
  .emc-table td:nth-child(2) { grid-column: 1; grid-row: 1; align-self: center; font-size: 15px; }
  .emc-table td:nth-child(n+3) { grid-column: 1 / -1; }
  .emc-table td:nth-child(n+3):not(:last-child) { display: flex; align-items: start; gap: 8px; }
  .emc-table td:nth-child(n+3):not(:last-child)::before {
    content: attr(data-label);
    flex: 0 0 92px;
    color: var(--emc-muted);
    font-size: 11px;
    font-weight: 600;
  }
  .emc-table td:last-child { padding-top: 9px; border-top: 1px solid var(--emc-line); }
  .emc-table .emc-empty { grid-column: 1 / -1; border: 0; padding: 12px; }
  .emc-table .emc-phone { white-space: normal; }
  .emc-order-cell .emc-drag-handle { display: none; }
  .emc-actions { width: 100%; flex-wrap: wrap; }
  .emc-actions button { flex: 1 1 calc(50% - 6px); min-height: 38px; }
  .emc-hidden-person { flex-wrap: wrap; }
  .emc-move-buttons button { min-width: 36px; min-height: 36px; }
  .emc-preview-pages { justify-content: start; }
  .emc-editor-fields { grid-template-columns: 1fr; }
  .emc-selected-head, .emc-selected-steps { padding-left: 12px; padding-right: 12px; }
  .emc-selected-steps { grid-template-columns: 1fr; }
  .emc-selected-departments { grid-template-columns: 1fr; }
  .emc-selected-actions { padding-left: 12px; padding-right: 12px; }
  .emc-selected-actions button { flex: 1 1 100%; }
  .emc-selected-status { margin-left: 12px; margin-right: 12px; }
  .emc-selected-layout-note { margin-left: 12px; margin-right: 12px; }
  .emc-selected-preview { padding-left: 12px; padding-right: 12px; }
  .emc-selected-preview-pages { justify-content: start; }
}
@media print {
  html, body { width: 210mm; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .emc-print-document .emc-print-page { width: 210mm; height: 296mm; margin: 0; padding: 12mm; border: 0; box-shadow: none; break-after: page; page-break-after: always; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .emc-print-document .emc-print-page:last-child { break-after: auto; page-break-after: auto; }
  .emc-print-document .emc-print-table tr { break-inside: avoid; page-break-inside: avoid; }
  .emc-selected-print-document .emc-selected-sheet { grid-template-rows: repeat(2, 148.5mm); width: 210mm; height: 297mm; margin: 0; overflow: hidden; box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  .emc-selected-print-document .emc-selected-sheet + .emc-selected-sheet { break-before: page; page-break-before: always; }
  .emc-selected-print-document .emc-selected-sheet:last-child { break-after: auto; page-break-after: auto; }
  .emc-selected-print-document .emc-selected-card { break-inside: avoid; page-break-inside: avoid; }
}
