/* Moart 공용 3단계 모달: 쇼핑몰 HTML 내보내기 (라이트 & 다크 모드) */
.mhem-backdrop {
  position: fixed; inset: 0; z-index: 10025; background: rgba(15, 23, 42, 0.62); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.mhem-modal {
  width: 100%; max-width: 580px; max-height: 92vh; overflow-y: auto;
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 22px 24px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28); display: flex; flex-direction: column; gap: 14px;
}
.mhem-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mhem-title { margin: 0; font-size: 18px; font-weight: 900; color: #0f172a; }
.mhem-sub { margin: 3px 0 0; font-size: 12px; color: #64748b; word-break: break-all; }
.mhem-close {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid #e2e8f0; background: #f8fafc;
  color: #475569; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.mhem-stepper {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px;
  padding: 5px; border-radius: 12px; background: #f1f5f9; border: 1px solid #e2e8f0;
}
.mhem-step-pill {
  border: none; background: transparent; padding: 7px 6px; border-radius: 9px;
  font-size: 12px; font-weight: 800; color: #64748b; cursor: pointer; text-align: center;
}
.mhem-step-pill.is-active { background: #4f46e5; color: #ffffff; }
.mhem-step-pill.is-done { color: #059669; background: #ecfdf5; }

.mhem-alert { padding: 10px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 700; }
.mhem-alert.is-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.mhem-alert.is-err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

.mhem-step-body { display: flex; flex-direction: column; gap: 12px; }
.mhem-step-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mhem-step-title { margin: 0; font-size: 15.5px; font-weight: 800; color: #0f172a; }

.mhem-mall-stack { display: flex; flex-direction: column; gap: 9px; }
.mhem-mall-card {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px;
  border-radius: 14px; border: 1.5px solid #e2e8f0; background: #ffffff; cursor: pointer;
}
.mhem-mall-card.is-active { border-color: #4f46e5; background: #eef2ff; }
.mhem-radio {
  width: 17px; height: 17px; border-radius: 999px; border: 2px solid #cbd5e1; flex-shrink: 0;
}
.mhem-mall-card.is-active .mhem-radio { border-color: #4f46e5; background: #4f46e5; box-shadow: inset 0 0 0 3px #ffffff; }
.mhem-mall-txt { display: flex; flex-direction: column; gap: 3px; }
.mhem-mall-txt strong { font-size: 14px; font-weight: 800; color: #0f172a; }
.mhem-mall-txt span { font-size: 12px; color: #64748b; }

.mhem-shortcut-btn {
  border: 1px dashed #6366f1; background: #eef2ff; color: #4338ca; border-radius: 11px;
  padding: 10px 13px; font-size: 12.5px; font-weight: 800; cursor: pointer; text-align: center;
}

.mhem-mini-btn {
  padding: 5px 10px; border-radius: 8px; border: 1px solid #cbd5e1; background: #ffffff;
  color: #334155; font-size: 11.5px; font-weight: 800; cursor: pointer;
}

.mhem-summary-preview {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  background: #f8fafc; border: 1px solid #e2e8f0;
}
.mhem-summary-thumb { width: 78px; height: 78px; object-fit: cover; border-radius: 10px; border: 1px solid #e2e8f0; flex-shrink: 0; }
.mhem-summary-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mhem-summary-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.mhem-summary-info strong { font-size: 13.5px; font-weight: 800; color: #0f172a; }
.mhem-summary-info p { margin: 0; font-size: 12px; color: #64748b; }

.mhem-primary-stack { display: flex; flex-direction: column; gap: 8px; }
.mhem-btn--full { width: 100%; }

.mhem-listing-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.mhem-listing-sec-title { font-size: 13px; font-weight: 800; color: #0f172a; }

.mhem-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid #e2e8f0;
}
.mhem-foot-right { display: flex; align-items: center; gap: 8px; }
.mhem-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 11px; font-size: 13px; font-weight: 800; cursor: pointer; border: 1px solid transparent;
}
.mhem-btn--indigo { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #ffffff; }
.mhem-btn--outline { background: #ffffff; border-color: #cbd5e1; color: #0f172a; }
.mhem-btn--ghost { background: transparent; color: #64748b; text-decoration: underline; padding: 8px 6px; font-size: 12px; }
.mhem-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 다크 모드 */
html[data-theme="dark"] .mhem-modal { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .mhem-title,
html[data-theme="dark"] .mhem-step-title,
html[data-theme="dark"] .mhem-mall-txt strong,
html[data-theme="dark"] .mhem-summary-info strong,
html[data-theme="dark"] .mhem-listing-sec-title { color: #f8fafc; }
html[data-theme="dark"] .mhem-sub,
html[data-theme="dark"] .mhem-mall-txt span,
html[data-theme="dark"] .mhem-summary-info p,
html[data-theme="dark"] .mhem-btn--ghost { color: #94a3b8; }
html[data-theme="dark"] .mhem-close,
html[data-theme="dark"] .mhem-stepper,
html[data-theme="dark"] .mhem-mall-card,
html[data-theme="dark"] .mhem-summary-preview,
html[data-theme="dark"] .mhem-mini-btn,
html[data-theme="dark"] .mhem-btn--outline { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .mhem-mall-card.is-active,
html[data-theme="dark"] .mhem-shortcut-btn { background: rgba(79, 70, 229, 0.22); border-color: #6366f1; color: #c7d2fe; }
html[data-theme="dark"] .mhem-step-pill.is-done { background: rgba(6, 78, 59, 0.4); color: #6ee7b7; }
html[data-theme="dark"] .mhem-foot,
html[data-theme="dark"] .mhem-listing-sec { border-top-color: #334155; }
