/* Moart 한국형 구독·포인트 통합 결제 모달 (라이트/다크 완벽 대응) */
.mscm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.mscm-backdrop[hidden] { display: none !important; }

.mscm-dialog {
  width: min(920px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.35);
}
.mscm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e2e8f0;
}
.mscm-eyebrow { display: block; font-size: 10.5px; font-weight: 800; color: #4f46e5; letter-spacing: 0.06em; }
.mscm-title { margin: 3px 0 0; font-size: 18px; font-weight: 800; color: #0f172a; }
.mscm-close {
  border: none; background: #f1f5f9; color: #475569; width: 32px; height: 32px;
  border-radius: 999px; font-size: 20px; cursor: pointer;
}

.mscm-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 310px;
  gap: 20px;
  padding: 20px 22px;
}
.mscm-left { display: flex; flex-direction: column; gap: 14px; }
.mscm-step-title { font-size: 13px; font-weight: 800; color: #1e293b; }

.mscm-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mscm-plan-card {
  text-align: left;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
  transition: all 0.14s ease;
}
.mscm-plan-card.is-active {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.mscm-plan-card__top { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.mscm-plan-card__top strong { font-size: 13px; color: #0f172a; }
.mscm-plan-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: #4f46e5; color: #ffffff; }
.mscm-plan-card__price { font-size: 16px; font-weight: 800; color: #0f172a; }
.mscm-plan-card__price span { font-size: 11px; font-weight: 600; color: #64748b; }
.mscm-plan-card__pts { font-size: 11.5px; font-weight: 700; color: #4338ca; }

.mscm-method-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mscm-method-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border-radius: 12px; border: 1.5px solid #e2e8f0;
  background: #ffffff; color: #334155; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.mscm-method-btn.is-active { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }

.mscm-sub-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.mscm-pill {
  padding: 6px 12px; border-radius: 999px; border: 1px solid #cbd5e1;
  background: #ffffff; color: #334155; font-size: 12px; font-weight: 700; cursor: pointer;
}
.mscm-pill.is-active { background: #0f172a; color: #ffffff; border-color: #0f172a; }

.mscm-pg-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0;
  font-size: 12.5px; font-weight: 700; color: #475569;
}
.mscm-pg-opt { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: #0f172a; }

.mscm-feat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mscm-feat-list li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #334155; }
.mscm-feat-list svg { color: #10b981; flex-shrink: 0; }

/* 우측 다크 글래스 정산 요약 */
.mscm-summary {
  background: linear-gradient(155deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border-radius: 16px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.mscm-summary__eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: #818cf8; }
.mscm-summary__plan { margin: 0; font-size: 17px; font-weight: 800; color: #ffffff; }
.mscm-summary__rows { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #cbd5e1; }
.mscm-summary__rows > div { display: flex; justify-content: space-between; align-items: center; }
.mscm-summary__rows strong { color: #ffffff; }
.mscm-summary__total {
  padding-top: 10px; margin-top: 4px; border-top: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 15px; font-weight: 800; color: #ffffff;
}
.mscm-summary__total strong { font-size: 19px; color: #a5b4fc; }
.mscm-summary__meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px; color: #94a3b8; line-height: 1.45;
}
.mscm-submit-btn {
  width: 100%; border: none; border-radius: 12px; padding: 13px 16px;
  background: #4f46e5; color: #ffffff; font-size: 14px; font-weight: 800; cursor: pointer;
}
.mscm-submit-btn:hover { background: #4338ca; }
.mscm-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.mscm-result {
  padding: 12px; border-radius: 10px; font-size: 12px; line-height: 1.5;
  display: flex; flex-direction: column; gap: 5px;
}
.mscm-result.is-ok { background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(16, 185, 129, 0.4); color: #a7f3d0; }
.mscm-result.is-err { background: rgba(239, 68, 68, 0.16); border: 1px solid rgba(239, 68, 68, 0.4); color: #fecaca; }
.mscm-result-link { color: #ffffff; font-weight: 800; text-decoration: underline; margin-top: 2px; }

/* 다크 모드 대응 */
html[data-theme="dark"] .mscm-dialog { background: #1e293b; border-color: #334155; color: #f8fafc; }
html[data-theme="dark"] .mscm-head { border-bottom-color: #334155; }
html[data-theme="dark"] .mscm-title,
html[data-theme="dark"] .mscm-step-title,
html[data-theme="dark"] .mscm-plan-card__top strong,
html[data-theme="dark"] .mscm-plan-card__price,
html[data-theme="dark"] .mscm-pg-opt { color: #f8fafc; }
html[data-theme="dark"] .mscm-plan-card,
html[data-theme="dark"] .mscm-method-btn,
html[data-theme="dark"] .mscm-pg-row,
html[data-theme="dark"] .mscm-pill {
  background: #0f172a; border-color: #334155; color: #e2e8f0;
}
html[data-theme="dark"] .mscm-plan-card.is-active,
html[data-theme="dark"] .mscm-method-btn.is-active {
  background: rgba(79, 70, 229, 0.24); border-color: #818cf8; color: #ffffff;
}
html[data-theme="dark"] .mscm-feat-list li { color: #cbd5e1; }
html[data-theme="dark"] .mscm-close { background: #0f172a; color: #cbd5e1; }

@media (max-width: 820px) {
  .mscm-body { grid-template-columns: 1fr; }
  .mscm-plan-grid { grid-template-columns: 1fr; }
}
