/* =========================================================
   SellerBee · 통합 마진 계산기 (/margin/)
   기존 styles.css / kr.css 뒤에 로드되는 추가 스타일.
   기존 사이트 규칙은 건드리지 않고 .mc-* 네임스페이스만 사용.
   ========================================================= */

body.mc-page {
  background: #f4f6fb;
  color: #1c2333;
  font-family: Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
.mc-page * { box-sizing: border-box; }

/* ---------- 헤더 ---------- */
.mc-head {
  position: static !important;
  background: #fff;
  border-bottom: 1px solid #e5e8f0;
  padding: 0;
}
.mc-head-inner {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
  min-height: 66px;
}
.mc-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.mc-logo .logo-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: #eef2ff;
}
.mc-logo .logo-mark img { width: 24px; height: 24px; object-fit: contain; }
.mc-logo .logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.mc-logo .logo-text strong { font-size: 16px; font-weight: 800; color: #17223b; white-space: nowrap; }
.mc-logo .logo-text em { font-style: normal; font-size: 11px; color: #7c8ba1; white-space: nowrap; }
.mc-logo .logo-cn i { font-style: normal; color: #3b6cf6; }
.mc-logo .logo-cn b { color: #f5a623; }

.mc-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.mc-nav a {
  white-space: nowrap;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 600;
  color: #3a4358;
  text-decoration: none;
  padding: 8px clamp(6px, 0.7vw, 13px);
  border-radius: 8px;
  letter-spacing: -0.3px;
}
.mc-nav a:hover { background: #f1f4fb; color: #3b6cf6; }
.mc-nav a.on { color: #3b6cf6; background: #eef2ff; }
.mc-head-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.mc-head-actions .btn {
  white-space: nowrap;
  font-size: clamp(12px, 0.9vw, 14px);
  padding: 8px 14px;
}
@media (max-width: 1080px) {
  .mc-nav a:nth-child(n+4):not(.on) { display: none; }
}
@media (max-width: 700px) {
  .mc-nav { display: none; }
  .mc-head-actions { margin-left: auto; }
  .mc-logo .logo-text em { display: none; }
}

/* ---------- 히어로 ---------- */
.mc-main { padding: 26px 0 40px; }
.mc-hero { text-align: center; margin-bottom: 22px; }
.mc-eyebrow {
  display: inline-block;
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px;
  color: #3b6cf6; background: #eef2ff;
  padding: 4px 11px; border-radius: 20px; margin-bottom: 10px;
}
.mc-hero h1 {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  margin: 0 0 10px;
  color: #17223b;
  letter-spacing: -0.6px;
}
.mc-hero h1 em { font-style: normal; color: #3b6cf6; }
.mc-hero p {
  max-width: 640px; margin: 0 auto;
  font-size: 13.5px; line-height: 1.75; color: #6b7280;
  word-break: keep-all;
}
.mc-hero p strong { color: #17223b; }

/* ---------- 레이아웃 ---------- */
.mc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) { .mc-grid { grid-template-columns: 1fr; } }

.mc-card {
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(23, 34, 59, .03);
}
.mc-card-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 800; color: #17223b;
  margin: 0 0 16px;
}
.mc-tag {
  font-size: 10.5px; font-weight: 700; color: #3b6cf6;
  background: #eef2ff; padding: 2px 8px; border-radius: 8px;
}
.mc-sub {
  font-size: 12.5px; font-weight: 700; color: #6b7280;
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px dashed #e5e8f0;
}

/* ---------- 입력 행 ---------- */
.mc-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.mc-row > label {
  flex: 0 0 132px;
  font-size: 13px; font-weight: 600; color: #3a4358;
  line-height: 1.35;
}
.mc-row > label small {
  display: block; font-weight: 400; font-size: 10.5px; color: #9aa1b0;
  margin-top: 1px;
}
.mc-field {
  flex: 1;
  display: flex; align-items: center;
  border: 1px solid #e2e6ef;
  border-radius: 9px;
  background: #fff;
  padding-right: 10px;
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}
.mc-field:focus-within {
  border-color: #3b6cf6;
  box-shadow: 0 0 0 3px rgba(59, 108, 246, .12);
}
.mc-field input, .mc-field select {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  padding: 9px 11px;
  font-size: 14px; font-weight: 600; color: #17223b;
  font-family: inherit;
  text-align: right;
  -moz-appearance: textfield;
}
.mc-field select { text-align: left; font-weight: 500; font-size: 13px; padding-right: 4px; cursor: pointer; }
.mc-field input::-webkit-outer-spin-button,
.mc-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mc-field > span {
  flex: 0 0 auto;
  font-size: 11.5px; color: #9aa1b0; font-weight: 500;
  padding-left: 4px;
}
@media (max-width: 460px) {
  .mc-row { align-items: stretch; flex-direction: column; gap: 5px; }
  .mc-row > label { flex: none; }
}

/* ---------- 프리셋 ---------- */
.mc-presets {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: -2px 0 12px 142px;
}
@media (max-width: 460px) { .mc-presets { margin-left: 0; } }
.mc-presets button {
  border: 1px solid #e2e6ef; background: #fff;
  color: #3a4358; font-size: 11.5px; font-weight: 600;
  padding: 4px 11px; border-radius: 14px; cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.mc-presets button:hover { border-color: #3b6cf6; color: #3b6cf6; background: #f7f9ff; }

.mc-reset {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #e2e6ef;
  background: #fafbfe;
  color: #6b7280;
  font-size: 12.5px; font-weight: 600;
  border-radius: 9px; cursor: pointer;
  font-family: inherit;
}
.mc-reset:hover { border-color: #c9d0e0; color: #3a4358; }

/* ---------- 결과 ---------- */
.mc-hero-num {
  background: linear-gradient(135deg, #f0f5ff 0%, #eaf1ff 100%);
  border: 1px solid #dfe8ff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.mc-hero-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.mc-hero-top span { font-size: 13px; font-weight: 700; color: #3a4358; }
.mc-hero-top strong {
  font-size: clamp(26px, 3.4vw, 32px);
  font-weight: 800; color: #3b6cf6;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.8px;
}
.mc-hero-top strong.neg { color: #e0356b; }
.mc-bar { height: 7px; border-radius: 6px; background: #dce6ff; overflow: hidden; margin-bottom: 12px; }
.mc-bar i {
  display: block; height: 100%; width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #3b6cf6, #7c9bff);
  transition: width .3s ease;
}
.mc-bar i.neg { background: linear-gradient(90deg, #e0356b, #ff86a9); }
.mc-hero-bot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; color: #4a5568;
}
.mc-hero-bot b {
  font-size: 15px; font-weight: 800; color: #17223b;
  font-variant-numeric: tabular-nums;
}
.mc-hero-bot b.pos { color: #0f9d58; }
.mc-hero-bot b.neg { color: #e0356b; }
.mc-muted { color: #7c8ba1; }

.mc-list { margin: 0; }
.mc-list > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f0f2f7;
}
.mc-list > div:last-child { border-bottom: none; }
.mc-list dt { font-size: 13px; color: #4a5568; font-weight: 500; }
.mc-list dt small { display: block; font-size: 10.5px; color: #9aa1b0; font-weight: 400; }
.mc-list dd {
  margin: 0; font-size: 14px; font-weight: 700; color: #17223b;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mc-list dd.pos { color: #0f9d58; }
.mc-list dd.neg { color: #e0356b; }
.mc-list dd.warn { color: #e0356b; }

.mc-toggle {
  margin-top: 14px;
  border: none; background: none; padding: 0;
  color: #3b6cf6; font-size: 12px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; font-family: inherit;
}
.mc-formula {
  margin-top: 10px;
  padding: 12px 14px;
  background: #fafbfe;
  border: 1px solid #eef0f6;
  border-radius: 10px;
  font-size: 11.5px; line-height: 1.85; color: #5a6478;
  word-break: keep-all;
}
.mc-formula p { margin: 0 0 2px; }
.mc-formula b { color: #3a4358; }

/* ---------- 안내 ---------- */
.mc-note {
  margin-top: 18px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 16px;
  padding: 24px;
}
.mc-note h2 {
  font-size: 15px; font-weight: 800; color: #17223b;
  margin: 0 0 16px;
}
.mc-note-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .mc-note-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .mc-note-grid { grid-template-columns: 1fr; } }
.mc-note-grid article {
  background: #fafbfe;
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 14px 15px;
}
.mc-note-grid h3 {
  font-size: 12.5px; font-weight: 800; color: #17223b;
  margin: 0 0 7px;
}
.mc-note-grid h3 span {
  display: block;
  font-size: 10.5px; font-weight: 600; color: #3b6cf6;
  margin-top: 2px;
}
.mc-note-grid p {
  margin: 0;
  font-size: 11.5px; line-height: 1.75; color: #6b7280;
  word-break: keep-all;
}
.mc-note-grid p strong { color: #3a4358; }

.mc-links {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 20px 0 14px;
}
.mc-links .btn { font-size: 13px; padding: 10px 18px; }
.mc-disclaimer {
  margin: 0;
  font-size: 11px; line-height: 1.7; color: #9aa1b0;
  word-break: keep-all;
}

/* ---------- 푸터 ---------- */
.mc-foot {
  border-top: 1px solid #e5e8f0;
  background: #fff;
  padding: 20px 0;
  text-align: center;
}
.mc-foot p { margin: 3px 0; font-size: 11.5px; color: #9aa1b0; }
.mc-foot a { color: #7c8ba1; text-decoration: none; }
.mc-foot a:hover { color: #3b6cf6; }
