/* Moart 신규 1차 메뉴: HTML 변환 (/dashboard.html?section=html-converter) — 시안 1 Creative Dark-Accent Bento */

.mhc-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 48px;
}

.mhc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mhc-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.mhc-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.mhc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.mhc-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.mhc-btn--indigo {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.24);
}
.mhc-btn--indigo:hover:not(:disabled) { filter: brightness(1.06); }
.mhc-btn--emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.22);
}
.mhc-btn--emerald:hover:not(:disabled) { filter: brightness(1.06); }
.mhc-btn--outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}
.mhc-btn--outline:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
.mhc-btn--full { width: 100%; padding: 12px 16px; font-size: 14px; }

.mhc-alert {
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.mhc-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.mhc-alert--ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }

/* 변환 내역 카드 */
.mhc-history-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
}
.mhc-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mhc-history-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mhc-history-item {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}
.mhc-history-item.is-active { border-color: #4f46e5; background: #eef2ff; }
.mhc-history-item strong { display: block; font-size: 12.5px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mhc-history-item span { display: block; font-size: 11px; color: #64748b; margin-top: 3px; }
.mhc-link-btn { border: none; background: transparent; color: #4f46e5; font-size: 12px; font-weight: 700; cursor: pointer; }
.mhc-muted { margin: 0; font-size: 12.5px; color: #64748b; }

/* 42 / 58 Split Bento 그리드 */
.mhc-grid {
  display: grid;
  grid-template-columns: minmax(340px, 42%) minmax(0, 58%);
  gap: 18px;
  align-items: start;
}

.mhc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}
.mhc-card__title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
}

/* 업로드 존 */
.mhc-upload-zone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.16s ease;
}
.mhc-upload-zone:hover,
.mhc-upload-zone.is-dragover {
  border-color: #4f46e5;
  background: #eef2ff;
}
.mhc-upload-empty {
  text-align: center;
  padding: 28px 16px;
  color: #475569;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.mhc-upload-empty strong { font-size: 14px; color: #0f172a; }
.mhc-upload-empty span { font-size: 12px; color: #64748b; }

.mhc-upload-preview {
  position: relative;
  width: 100%;
  height: 260px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mhc-upload-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.mhc-upload-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* 모드 & 타겟 쇼핑몰 */
.mhc-field { display: flex; flex-direction: column; gap: 8px; }
.mhc-label { font-size: 12.5px; font-weight: 800; color: #334155; }
.mhc-mode-list { display: flex; flex-direction: column; gap: 8px; }
.mhc-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s;
}
.mhc-mode-card.is-active {
  border-color: #4f46e5;
  background: #f5f3ff;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}
.mhc-radio {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  position: relative;
}
.mhc-mode-card.is-active .mhc-radio { border-color: #4f46e5; }
.mhc-mode-card.is-active .mhc-radio::after {
  content: '';
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: #4f46e5;
}
.mhc-mode-card strong { display: block; font-size: 13px; color: #0f172a; }
.mhc-mode-card strong em { font-style: normal; color: #4f46e5; }
.mhc-mode-card p { margin: 3px 0 0; font-size: 11.5px; color: #64748b; }

.mhc-mall-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mhc-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.mhc-chip.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.mhc-quote-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 12.5px;
}
.mhc-quote-box b { font-weight: 800; color: #1e1b4b; }

/* 우측 미리보기 패널 */
.mhc-right-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mhc-seo-pill {
  font-size: 11.5px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 999px;
}
.mhc-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mhc-seg-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
}
.mhc-seg-tab {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.mhc-seg-tab.is-active {
  background: #0f172a;
  color: #ffffff;
}
.mhc-preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mhc-device-toggle {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  overflow: hidden;
  background: #f8fafc;
}
.mhc-dev-btn {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 7px 8px;
  cursor: pointer;
  display: inline-flex;
}
.mhc-dev-btn.is-active { background: #0f172a; color: #ffffff; }

.mhc-stage {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  min-height: 540px;
  max-height: 760px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mhc-stage-empty {
  margin: auto;
  text-align: center;
  padding: 42px 24px;
  max-width: 420px;
}
.mhc-stage-empty strong { display: block; font-size: 15px; color: #0f172a; margin-bottom: 8px; }
.mhc-stage-empty p { margin: 0; font-size: 13px; color: #64748b; line-height: 1.6; }

.mhc-editable-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}
.mhc-save-inline-btn {
  border: none;
  background: #4f46e5;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.mhc-live-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  justify-content: center;
}
.mhc-live-canvas {
  width: 100%;
  max-width: 860px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  outline: none;
  height: max-content;
}
.mhc-live-viewport.is-mobile .mhc-live-canvas { max-width: 375px; }
.mhc-live-canvas:focus { box-shadow: 0 0 0 2px #4f46e5; }

.mhc-code-wrap { flex: 1; overflow: auto; background: #0f172a; padding: 16px; }
.mhc-code-pre { margin: 0; font-size: 12px; line-height: 1.55; color: #e2e8f0; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.mhc-compare-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  min-height: 0;
}
.mhc-compare-col {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  min-height: 0;
}
.mhc-compare-label {
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.mhc-compare-scroll { flex: 1; overflow-y: auto; padding: 10px; }

/* HTML 변환 진입 시 신규 Moart 상단 배너 정상 노출 */

/* 다크모드 완벽 대응 (html[data-theme="dark"]) */
html[data-theme="dark"] .mhc-title,
html[data-theme="dark"] .mhc-card__title,
html[data-theme="dark"] .mhc-mode-card strong,
html[data-theme="dark"] .mhc-upload-empty strong,
html[data-theme="dark"] .mhc-stage-empty strong,
html[data-theme="dark"] .mhc-history-item strong { color: #f8fafc; }

html[data-theme="dark"] .mhc-sub,
html[data-theme="dark"] .mhc-label,
html[data-theme="dark"] .mhc-mode-card p,
html[data-theme="dark"] .mhc-stage-empty p,
html[data-theme="dark"] .mhc-history-item span { color: #94a3b8; }

html[data-theme="dark"] .mhc-card,
html[data-theme="dark"] .mhc-history-card {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .mhc-upload-zone,
html[data-theme="dark"] .mhc-mode-card,
html[data-theme="dark"] .mhc-chip,
html[data-theme="dark"] .mhc-btn--outline,
html[data-theme="dark"] .mhc-seg-tabs,
html[data-theme="dark"] .mhc-device-toggle,
html[data-theme="dark"] .mhc-stage,
html[data-theme="dark"] .mhc-history-item {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .mhc-mode-card.is-active {
  background: rgba(79, 70, 229, 0.2);
  border-color: #818cf8;
}
html[data-theme="dark"] .mhc-chip.is-active,
html[data-theme="dark"] .mhc-seg-tab.is-active,
html[data-theme="dark"] .mhc-dev-btn.is-active {
  background: #4f46e5;
  border-color: #6366f1;
  color: #ffffff;
}
html[data-theme="dark"] .mhc-quote-box {
  background: rgba(79, 70, 229, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
  color: #e0e7ff;
}
html[data-theme="dark"] .mhc-quote-box b { color: #ffffff; }
html[data-theme="dark"] .mhc-editable-hint { background: #1e293b; color: #cbd5e1; }

@media (max-width: 1120px) {
  .mhc-grid { grid-template-columns: 1fr; }
}

/* 변환 시작 전 포인트 · 경고 확인 모달 */
.mhc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mhc-modal {
  width: min(500px, 95vw);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.36);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mhc-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mhc-modal__eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  color: #4f46e5;
  background: #eef2ff;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.mhc-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}
.mhc-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mhc-modal__summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.mhc-modal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #475569;
}
.mhc-modal__row strong { color: #0f172a; font-weight: 800; }
.mhc-modal__row strong.is-danger { color: #dc2626; }
.mhc-modal__row.is-highlight {
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  font-size: 13.5px;
}
.mhc-modal__row.is-highlight strong { color: #4f46e5; font-size: 15px; }
.mhc-modal__row.is-highlight small { font-size: 11.5px; font-weight: 600; color: #64748b; }

.mhc-modal__warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: #92400e;
}
.mhc-modal__warn.is-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.mhc-modal__warn strong { display: block; font-size: 12.5px; margin-bottom: 6px; }
.mhc-modal__warn p { margin: 0; line-height: 1.5; }
.mhc-modal__warn ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; line-height: 1.5; }

.mhc-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

html[data-theme="dark"] .mhc-modal { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .mhc-modal__title,
html[data-theme="dark"] .mhc-modal__row strong { color: #f8fafc; }
html[data-theme="dark"] .mhc-modal__summary,
html[data-theme="dark"] .mhc-modal__close { background: #0f172a; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .mhc-modal__row { color: #94a3b8; }
html[data-theme="dark"] .mhc-modal__row.is-highlight strong { color: #a5b4fc; }
html[data-theme="dark"] .mhc-modal__warn { background: rgba(245, 158, 11, 0.12); border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }
html[data-theme="dark"] .mhc-modal__warn.is-danger { background: rgba(239, 68, 68, 0.15); border-color: rgba(248, 113, 113, 0.45); color: #fca5a5; }

/* 언어/레이어 배지 및 실측 지표 바 */
.mhc-pills-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mhc-lang-pill {
  font-size: 11px;
  font-weight: 800;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 4px 10px;
  border-radius: 999px;
}
.mhc-metrics-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.mhc-metrics-bar b { color: #a5b4fc; font-weight: 800; }

/* 인라인 미리보기에서 분리된 텍스트 레이어 hover 편집 힌트 */
.mhc-live-canvas [data-layer-type="text"] {
  transition: outline 0.12s ease, background-color 0.12s ease;
  cursor: text;
}
.mhc-live-canvas [data-layer-type="text"]:hover {
  outline: 1.5px dashed #4f46e5;
  outline-offset: 2px;
  background-color: rgba(79, 70, 229, 0.06);
}
.mhc-live-canvas [data-layer-type="text"]:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  background-color: rgba(255, 255, 255, 0.85);
}

/* 분리 레이어 탭 */
.mhc-layers-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mhc-layers-scroll { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.mhc-layer-sec { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.mhc-layer-sec__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #475569;
}
.mhc-layer-sec__head strong { color: #0f172a; font-size: 13px; }
.mhc-layer-items { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.mhc-layer-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 11px; border-radius: 10px; border: 1px solid #e2e8f0; background: #ffffff;
}
.mhc-layer-tag {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; color: #ffffff;
}
.mhc-layer-tag.is-photo { background: #0284c7; }
.mhc-layer-tag.is-text { background: #4f46e5; }
.mhc-layer-tag.is-shape { background: #d97706; }
.mhc-layer-mini { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; border: 1px solid #e2e8f0; flex-shrink: 0; }
.mhc-layer-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid #cbd5e1; flex-shrink: 0; display: inline-block; }
.mhc-layer-info strong { display: block; font-size: 12.5px; color: #0f172a; }
.mhc-layer-info small { font-size: 11px; color: #64748b; }
.mhc-layer-edit-col { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mhc-layer-orig { font-size: 11px; color: #64748b; }
.mhc-layer-textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 9px;
  font-size: 12.5px; font-family: inherit; color: #0f172a; background: #f8fafc; resize: vertical;
}
.mhc-layer-textarea:focus { outline: none; border-color: #4f46e5; background: #ffffff; }

html[data-theme="dark"] .mhc-layer-sec,
html[data-theme="dark"] .mhc-layer-row { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .mhc-layer-sec__head { background: #0f172a; border-bottom-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .mhc-layer-sec__head strong,
html[data-theme="dark"] .mhc-layer-info strong { color: #f8fafc; }
html[data-theme="dark"] .mhc-layer-textarea { background: #0f172a; border-color: #334155; color: #f8fafc; }

/* 실시간 작업 진행 상태바 · 경과 시간 패널 */
.mhc-progress-card {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1.5px solid #c7d2fe;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.10);
}
.mhc-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mhc-progress-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #312e81;
}
.mhc-progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.22);
  animation: mhcPulse 1.2s ease-in-out infinite;
}
@keyframes mhcPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}
.mhc-progress-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.mhc-elapsed-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}
.mhc-progress-pct {
  font-size: 14px;
  font-weight: 900;
  color: #4f46e5;
  min-width: 40px;
  text-align: right;
}
.mhc-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.16);
  overflow: hidden;
  position: relative;
}
.mhc-progress-fill {
  height: 100%;
  width: 4%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #6366f1, #10b981);
  background-size: 200% 100%;
  transition: width 0.25s ease-out;
  animation: mhcShimmer 2.2s linear infinite;
}
@keyframes mhcShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.mhc-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.mhc-pstep {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mhc-pstep.is-active {
  border-color: #4f46e5;
  background: #ffffff;
  color: #312e81;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.14);
}
.mhc-pstep.is-done {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}
.mhc-pstep-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mhc-pstep.is-active .mhc-pstep-num { background: #4f46e5; color: #ffffff; }
.mhc-pstep.is-done .mhc-pstep-num { background: #10b981; color: #ffffff; }

/* 4단계 워크플로우 안내 배너 & 투명 누끼 미리보기 */
.mhc-flow-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}
.mhc-flow-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.mhc-flow-arrow { color: #94a3b8; font-weight: 800; }
.mhc-layer-tag.is-cutout { background: #0d9488; }
.mhc-layer-tag.is-bg { background: #475569; }
.mhc-layer-mini.is-checker {
  background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  object-fit: contain;
}

@media (max-width: 900px) {
  .mhc-progress-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

html[data-theme="dark"] .mhc-progress-card {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.36) 0%, rgba(30, 41, 59, 0.92) 100%);
  border-color: #4338ca;
}
html[data-theme="dark"] .mhc-progress-title { color: #e0e7ff; }
html[data-theme="dark"] .mhc-elapsed-pill { background: #0f172a; border-color: #4338ca; color: #c7d2fe; }
html[data-theme="dark"] .mhc-progress-pct { color: #a5b4fc; }
html[data-theme="dark"] .mhc-pstep { background: rgba(15, 23, 42, 0.72); border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .mhc-pstep.is-active { background: #1e293b; border-color: #6366f1; color: #e0e7ff; }
html[data-theme="dark"] .mhc-pstep.is-done { background: rgba(16, 185, 129, 0.14); border-color: #10b981; color: #6ee7b7; }
html[data-theme="dark"] .mhc-flow-chip { background: #1e293b; border-color: #334155; color: #cbd5e1; }

/* 최대 10장 다중 이미지 등록 큐 UI */
.mhc-left-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mhc-count-pill {
  font-size: 11.5px;
  font-weight: 800;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.mhc-upload-zone.is-multi {
  align-items: stretch;
  justify-content: flex-start;
  min-height: 220px;
  padding: 12px;
  cursor: default;
}
.mhc-multi-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mhc-multi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #334155;
}
.mhc-multi-head b { color: #4f46e5; font-weight: 800; }
.mhc-multi-head-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mhc-mini-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.mhc-mini-btn.is-primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}
.mhc-multi-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 2px;
}
.mhc-multi-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}
.mhc-multi-order {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.mhc-multi-thumb {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #0f172a;
}
.mhc-multi-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mhc-multi-meta strong {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mhc-multi-meta small {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.mhc-multi-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.mhc-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mhc-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mhc-icon-btn.is-del:hover { border-color: #ef4444; color: #dc2626; background: #fef2f2; }

html[data-theme="dark"] .mhc-count-pill { background: rgba(79, 70, 229, 0.22); border-color: rgba(129, 140, 248, 0.4); color: #c7d2fe; }
html[data-theme="dark"] .mhc-multi-head { color: #cbd5e1; }
html[data-theme="dark"] .mhc-multi-head b { color: #a5b4fc; }
html[data-theme="dark"] .mhc-mini-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .mhc-mini-btn.is-primary { background: #4f46e5; border-color: #6366f1; color: #ffffff; }
html[data-theme="dark"] .mhc-multi-item { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .mhc-multi-order { background: rgba(79, 70, 229, 0.24); color: #c7d2fe; }
html[data-theme="dark"] .mhc-multi-meta strong { color: #f8fafc; }
html[data-theme="dark"] .mhc-multi-meta small { color: #94a3b8; }
html[data-theme="dark"] .mhc-icon-btn { background: #0f172a; border-color: #334155; color: #cbd5e1; }

/* 티어 선택 · 번역/화질/출력 옵션 · 우측 상단 자동계산 확인영역 · 우측 하단 참고 가격표 */
.mhc-tier-body {
  flex: 1;
  min-width: 0;
}
.mhc-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.mhc-tier-top strong em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.mhc-tier-price {
  font-size: 12px;
  font-weight: 900;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mhc-label-note {
  font-weight: 600;
  color: #64748b;
  margin-left: 4px;
}
.mhc-opt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mhc-opt-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}
.mhc-opt-chip small {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mhc-opt-chip:hover {
  border-color: #a5b4fc;
  background: #ffffff;
}
.mhc-opt-chip.is-active {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #312e81;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.12);
}
.mhc-opt-chip.is-active small {
  color: #4f46e5;
}
.mhc-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* 우측 3단 스택 */
.mhc-right-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* 우측 상단: 실시간 자동 계산 확인영역 */
.mhc-calc-card {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
  border: 1.5px solid #c7d2fe;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.08);
  gap: 14px;
}
.mhc-calc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.mhc-calc-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.mhc-calc-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}
.mhc-calc-total {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 10px 16px;
  min-width: 170px;
}
.mhc-calc-total-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.mhc-calc-total-pts {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
  color: #4f46e5;
  font-variant-numeric: tabular-nums;
}
.mhc-calc-total-krw {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.mhc-calc-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.mhc-calc-kv {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mhc-calc-kv span {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.mhc-calc-kv strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mhc-calc-formula-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border-radius: 11px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  font-size: 12.5px;
  color: #312e81;
}
.mhc-calc-formula {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}
.mhc-calc-formula b {
  font-weight: 900;
  color: #4338ca;
}
.mhc-calc-wallet {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.mhc-calc-wallet b {
  color: #0f172a;
  font-weight: 800;
}
.mhc-calc-cta {
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 800;
}

/* 우측 하단: 참고 가격표 카드 */
.mhc-ref-card {
  gap: 12px;
}
.mhc-ref-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mhc-ref-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}
.mhc-ref-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}
.mhc-ref-pill {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.mhc-ref-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.mhc-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mhc-ref-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
  text-align: center;
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.mhc-ref-table th:first-child {
  text-align: left;
}
.mhc-ref-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  color: #334155;
  vertical-align: middle;
}
.mhc-ref-table td:first-child {
  text-align: left;
}
.mhc-ref-table tbody tr {
  cursor: pointer;
  transition: background-color 0.14s ease;
}
.mhc-ref-table tbody tr:last-child td {
  border-bottom: none;
}
.mhc-ref-table tbody tr:hover {
  background: #f8fafc;
}
.mhc-ref-table tbody tr.is-active {
  background: #eef2ff;
}
.mhc-ref-tier-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mhc-ref-tier-cell strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}
.mhc-ref-tier-cell small {
  font-size: 11px;
  color: #64748b;
}
.mhc-ref-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.mhc-ref-badge.is-rec {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}
.mhc-ref-pts {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
}
.mhc-ref-table tbody tr.is-active .mhc-ref-pts {
  color: #4f46e5;
}
.mhc-ref-krw {
  display: block;
  font-size: 10.5px;
  color: #64748b;
}
.mhc-ref-edit {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  white-space: nowrap;
}
.mhc-ref-edit.is-yes {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.mhc-ref-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #64748b;
}

@media (max-width: 780px) {
  .mhc-opt-grid,
  .mhc-field-row,
  .mhc-calc-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* 다크 모드 대응 */
html[data-theme="dark"] .mhc-tier-top strong em,
html[data-theme="dark"] .mhc-tier-price {
  background: rgba(79, 70, 229, 0.24);
  border-color: rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
}
html[data-theme="dark"] .mhc-opt-chip {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .mhc-opt-chip small { color: #94a3b8; }
html[data-theme="dark"] .mhc-opt-chip.is-active {
  background: rgba(79, 70, 229, 0.24);
  border-color: #6366f1;
  color: #e0e7ff;
}
html[data-theme="dark"] .mhc-opt-chip.is-active small { color: #a5b4fc; }

html[data-theme="dark"] .mhc-calc-card {
  background: linear-gradient(135deg, #1e293b 0%, rgba(49, 46, 129, 0.32) 100%);
  border-color: #4338ca;
}
html[data-theme="dark"] .mhc-calc-eyebrow {
  background: rgba(79, 70, 229, 0.28);
  border-color: rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
}
html[data-theme="dark"] .mhc-calc-title { color: #f8fafc; }
html[data-theme="dark"] .mhc-calc-total {
  background: #0f172a;
  border-color: #4338ca;
}
html[data-theme="dark"] .mhc-calc-total-label,
html[data-theme="dark"] .mhc-calc-total-krw { color: #94a3b8; }
html[data-theme="dark"] .mhc-calc-total-pts { color: #a5b4fc; }
html[data-theme="dark"] .mhc-calc-kv {
  background: rgba(15, 23, 42, 0.72);
  border-color: #334155;
}
html[data-theme="dark"] .mhc-calc-kv span { color: #94a3b8; }
html[data-theme="dark"] .mhc-calc-kv strong { color: #f8fafc; }
html[data-theme="dark"] .mhc-calc-formula-bar {
  background: rgba(49, 46, 129, 0.35);
  border-color: #4338ca;
  color: #e0e7ff;
}
html[data-theme="dark"] .mhc-calc-formula b { color: #a5b4fc; }
html[data-theme="dark"] .mhc-calc-wallet {
  background: #0f172a;
  border-color: #4338ca;
  color: #cbd5e1;
}
html[data-theme="dark"] .mhc-calc-wallet b { color: #f8fafc; }

html[data-theme="dark"] .mhc-ref-title,
html[data-theme="dark"] .mhc-ref-tier-cell strong,
html[data-theme="dark"] .mhc-ref-pts { color: #f8fafc; }
html[data-theme="dark"] .mhc-ref-sub,
html[data-theme="dark"] .mhc-ref-tier-cell small,
html[data-theme="dark"] .mhc-ref-krw,
html[data-theme="dark"] .mhc-ref-foot { color: #94a3b8; }
html[data-theme="dark"] .mhc-ref-pill {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
html[data-theme="dark"] .mhc-ref-table-wrap { border-color: #334155; }
html[data-theme="dark"] .mhc-ref-table th {
  background: #0f172a;
  color: #cbd5e1;
  border-bottom-color: #334155;
}
html[data-theme="dark"] .mhc-ref-table td {
  border-bottom-color: #1e293b;
  color: #cbd5e1;
}
html[data-theme="dark"] .mhc-ref-table tbody tr:hover { background: rgba(51, 65, 85, 0.35); }
html[data-theme="dark"] .mhc-ref-table tbody tr.is-active { background: rgba(79, 70, 229, 0.22); }
html[data-theme="dark"] .mhc-ref-table tbody tr.is-active .mhc-ref-pts { color: #a5b4fc; }
html[data-theme="dark"] .mhc-ref-badge { background: #0f172a; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .mhc-ref-edit { background: #0f172a; color: #94a3b8; }
html[data-theme="dark"] .mhc-ref-edit.is-yes {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* 번역 펼침 언어/스타일 패널 & 등록 이미지 실시간 미리보기 스택 */
.mhc-tr-expand {
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  background: #f5f7ff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mhc-tr-expand-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mhc-tr-sublabel {
  font-size: 11.5px;
  font-weight: 800;
  color: #3730a3;
}
.mhc-select {
  width: 100%;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1.5px solid #c7d2fe;
  background: #ffffff;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.mhc-select:focus {
  outline: none;
  border-color: #4f46e5;
}
.mhc-opt-chip--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.mhc-opt-chip--stack small {
  white-space: normal;
  font-weight: 600;
  font-size: 10.5px;
  line-height: 1.35;
}
.mhc-upload-preview-stack {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mhc-upload-preview-fig {
  margin: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.mhc-upload-preview-fig figcaption {
  padding: 7px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}
.mhc-upload-preview-fig img {
  width: 100%;
  height: auto;
  display: block;
}

html[data-theme="dark"] .mhc-tr-expand {
  background: rgba(49, 46, 129, 0.24);
  border-color: #4338ca;
}
html[data-theme="dark"] .mhc-tr-sublabel { color: #c7d2fe; }
html[data-theme="dark"] .mhc-select {
  background: #0f172a;
  border-color: #4338ca;
  color: #f8fafc;
}
html[data-theme="dark"] .mhc-upload-preview-fig {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .mhc-upload-preview-fig figcaption {
  background: #0f172a;
  border-bottom-color: #334155;
  color: #cbd5e1;
}
.mhc-cta-done-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 상단 동일 글자 크기(24px) 메인 탭: HTML 변환 · 요소별 레이어 분리 | 작업내역 */
.mhc-main-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mhc-main-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 0 2px 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.mhc-main-tab:hover { color: #334155; }
.mhc-main-tab.is-active {
  color: #0f172a;
  border-bottom-color: #4f46e5;
}
.mhc-main-tab-sep {
  font-size: 20px;
  font-weight: 300;
  color: #cbd5e1;
  user-select: none;
  padding-bottom: 6px;
}
.mhc-main-tab-count {
  font-size: 13px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  letter-spacing: 0;
}
.mhc-main-tab.is-active .mhc-main-tab-count {
  background: #eef2ff;
  color: #4f46e5;
}

/* 작업내역 탭 전체 폭 테이블 */
.mhc-history-tab-panel { padding: 16px 18px; }
.mhc-history-table-wrap { width: 100%; overflow-x: auto; }
.mhc-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mhc-history-table th {
  text-align: left; padding: 10px 12px; font-size: 11.5px; font-weight: 800;
  color: #64748b; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.mhc-history-table td {
  padding: 11px 12px; border-bottom: 1px solid #f1f5f9; color: #1e293b; vertical-align: middle;
}
.mhc-history-table tr.is-active td { background: #eef2ff; }
.mhc-hist-thumb {
  width: 52px; height: 52px; object-fit: cover; border-radius: 9px;
  border: 1px solid #e2e8f0; display: block; background: #f8fafc;
}
.mhc-hist-name { display: flex; flex-direction: column; gap: 4px; max-width: 340px; }
.mhc-hist-name strong { font-size: 13.5px; font-weight: 800; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mhc-hist-badge {
  align-self: flex-start; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: #eef2ff; color: #4338ca;
}
.mhc-hist-date { font-size: 12px; color: #64748b; white-space: nowrap; }
.mhc-hist-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

html[data-theme="dark"] .mhc-main-tab { color: #64748b; }
html[data-theme="dark"] .mhc-main-tab:hover { color: #cbd5e1; }
html[data-theme="dark"] .mhc-main-tab.is-active { color: #f8fafc; border-bottom-color: #6366f1; }
html[data-theme="dark"] .mhc-main-tab-sep { color: #334155; }
html[data-theme="dark"] .mhc-main-tab-count { background: #1e293b; color: #94a3b8; }
html[data-theme="dark"] .mhc-main-tab.is-active .mhc-main-tab-count { background: rgba(79, 70, 229, 0.3); color: #c7d2fe; }
html[data-theme="dark"] .mhc-history-table th { background: #0f172a; color: #94a3b8; border-bottom-color: #334155; }
html[data-theme="dark"] .mhc-history-table td { color: #e2e8f0; border-bottom-color: #1e293b; }
html[data-theme="dark"] .mhc-history-table tr.is-active td { background: rgba(79, 70, 229, 0.18); }
html[data-theme="dark"] .mhc-hist-name strong { color: #f8fafc; }
html[data-theme="dark"] .mhc-hist-thumb { border-color: #334155; background: #0f172a; }

/* 작업내역 썸네일 클릭 확대보기 + 사이즈·생성시간 컬럼 + 사이즈 확대 옵션 UI */
.mhc-hist-thumb-btn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.mhc-hist-thumb-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.mhc-hist-size,
.mhc-hist-elapsed {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12.5px;
  color: #334155;
}
.mhc-hist-size strong {
  color: #4f46e5;
  font-weight: 800;
}
.mhc-size-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mhc-upload-preview-fig figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.mhc-fig-size-badge {
  font-size: 11px;
  font-weight: 800;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.mhc-upscale-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mhc-size-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mhc-size-input-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 12px;
  color: #475569;
}
.mhc-size-input-box input {
  width: 68px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mhc-size-input-box em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}
.mhc-size-x {
  font-weight: 800;
  color: #64748b;
}

[data-theme="dark"] .mhc-hist-size,
body.dark-mode .mhc-hist-size,
[data-theme="dark"] .mhc-hist-elapsed,
body.dark-mode .mhc-hist-elapsed {
  color: #cbd5e1;
}
[data-theme="dark"] .mhc-hist-size strong,
body.dark-mode .mhc-hist-size strong {
  color: #a5b4fc;
}
[data-theme="dark"] .mhc-size-pill,
body.dark-mode .mhc-size-pill {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .mhc-fig-size-badge,
body.dark-mode .mhc-fig-size-badge {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
}
[data-theme="dark"] .mhc-size-input-box,
body.dark-mode .mhc-size-input-box {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
[data-theme="dark"] .mhc-size-input-box input,
body.dark-mode .mhc-size-input-box input {
  color: #f8fafc;
}

/* 작업내역 검색 · 날짜 필터 · 페이지네이션 */
.mhc-hist-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 14px;
}
.mhc-hist-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mhc-hist-search-box {
  flex: 1 1 260px;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #64748b;
}
.mhc-hist-search-box:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.mhc-hist-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #0f172a;
}
.mhc-hist-select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.mhc-hist-select.is-compact {
  height: 32px;
  font-size: 12px;
}
.mhc-hist-date-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12.5px;
}
.mhc-hist-date-input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 600;
}
.mhc-hist-search-btn,
.mhc-hist-reset-btn {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}
.mhc-hist-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mhc-hist-quick-dates {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mhc-hist-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mhc-hist-count-info {
  font-size: 12.5px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.mhc-hist-count-info b {
  color: #0f172a;
}
.mhc-hist-pagination {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mhc-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.mhc-page-btn:hover:not(:disabled) {
  border-color: #4f46e5;
  color: #4f46e5;
  background: #eef2ff;
}
.mhc-page-btn.is-active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}
.mhc-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

[data-theme="dark"] .mhc-hist-toolbar,
body.dark-mode .mhc-hist-toolbar {
  background: #0f172a;
  border-color: #334155;
}
[data-theme="dark"] .mhc-hist-search-box,
body.dark-mode .mhc-hist-search-box,
[data-theme="dark"] .mhc-hist-select,
body.dark-mode .mhc-hist-select,
[data-theme="dark"] .mhc-hist-date-input,
body.dark-mode .mhc-hist-date-input,
[data-theme="dark"] .mhc-page-btn,
body.dark-mode .mhc-page-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
[data-theme="dark"] .mhc-hist-search-box input,
body.dark-mode .mhc-hist-search-box input {
  color: #f8fafc;
}
[data-theme="dark"] .mhc-hist-count-info,
body.dark-mode .mhc-hist-count-info {
  color: #94a3b8;
}
[data-theme="dark"] .mhc-hist-count-info b,
body.dark-mode .mhc-hist-count-info b {
  color: #f8fafc;
}
[data-theme="dark"] .mhc-page-btn.is-active,
body.dark-mode .mhc-page-btn.is-active {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}
