/* ---------------------------------------------------------
   geukrim.com — /margin-calculator/ 중국 사입 마진 계산기
   style.css의 토큰(--gk-*)을 그대로 쓴다.
--------------------------------------------------------- */

.gk-mg-page {
  padding-top: 52px;
}

.gk-mg {
  padding-top: 34px;
  padding-bottom: 16px;
}

.gk-mg [hidden] { display: none !important; }

/* 히어로 */
.gk-mg-hero {
  max-width: 820px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--gk-line);
}

.gk-mg-kicker {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gk-accent);
}

.gk-mg-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.8vw, 40px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.04em;
}

.gk-mg-lead {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--gk-muted);
}

.gk-mg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.gk-mg-chips li {
  padding: 5px 11px;
  border: 1px solid var(--gk-line);
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gk-muted);
}

/* ---------------------------------------------------------
   레이아웃
--------------------------------------------------------- */
.gk-mg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-top: 34px;
}

.gk-mg-inputs {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.gk-mg-card {
  padding: 22px 24px 20px;
  border: 1px solid var(--gk-line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 18px 40px -30px rgba(11, 18, 32, 0.35);
  min-width: 0;
}

.gk-mg-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gk-line);
  margin-bottom: 4px;
}

.gk-mg-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gk-ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0;
}

.gk-mg-card-head h2 {
  margin: 0;
  font-size: 17.5px;
  letter-spacing: -0.03em;
}

.gk-mg-card-head p {
  margin: 0 0 0 auto;
  font-size: 12px;
  color: var(--gk-muted-2);
  white-space: nowrap;
}

/* ---------------------------------------------------------
   필드
--------------------------------------------------------- */
.gk-mg-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  align-items: center;
  gap: 8px 12px;
  padding: 9px 0 0;
}

.gk-mg-field > label,
.gk-mg-label-row {
  display: block;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--gk-ink-soft);
  letter-spacing: -0.01em;
}

.gk-mg-field > label span,
.gk-mg-label-row span {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gk-muted-2);
  letter-spacing: 0;
}

.gk-mg-field--wide {
  display: block;
}

.gk-mg-field--wide > label,
.gk-mg-field--wide .gk-mg-label-row {
  margin-bottom: 6px;
}

.gk-mg-pair,
.gk-mg-pair-tight {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.gk-mg-pair { grid-template-columns: 1fr 1fr; }
.gk-mg-pair-tight { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.gk-mg-pair .gk-mg-field,
.gk-mg-pair-tight .gk-mg-field {
  display: block;
  padding-top: 9px;
}

.gk-mg-pair .gk-mg-field > label,
.gk-mg-pair-tight .gk-mg-field > label {
  margin-bottom: 6px;
}

.gk-mg-input {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 11px;
  border: 1px solid var(--gk-line-strong);
  border-radius: 5px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gk-mg-input:focus-within {
  border-color: var(--gk-accent);
  box-shadow: 0 0 0 3px rgba(15, 76, 255, 0.12);
}

.gk-mg-input.is-disabled {
  background: var(--gk-surface);
  opacity: 0.72;
}

.gk-mg-input input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gk-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.gk-mg-input input::-webkit-outer-spin-button,
.gk-mg-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gk-mg-affix,
.gk-mg-unit {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gk-muted-2);
  white-space: nowrap;
}

.gk-mg-affix { order: -1; }

.gk-mg-select {
  width: 100%;
  padding: 11px 34px 11px 12px;
  border: 1px solid var(--gk-line-strong);
  border-radius: 5px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px 8px;
  color: var(--gk-ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.gk-mg-select:focus {
  outline: none;
  border-color: var(--gk-accent);
  box-shadow: 0 0 0 3px rgba(15, 76, 255, 0.12);
}

.gk-mg-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--gk-muted);
  cursor: pointer;
}

.gk-mg-check input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--gk-accent);
  cursor: pointer;
}

.gk-mg-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--gk-muted-2);
}

.gk-mg-hint strong { color: var(--gk-muted); }

.gk-mg-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 6px;
  background: var(--gk-surface);
  border: 1px solid var(--gk-line);
}

.gk-mg-inline span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gk-muted);
}

.gk-mg-inline strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--gk-ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* 세그먼트 버튼 */
.gk-mg-seg {
  display: inline-flex;
  width: 100%;
  padding: 3px;
  border: 1px solid var(--gk-line-strong);
  border-radius: 6px;
  background: var(--gk-surface);
  gap: 3px;
}

.gk-mg-seg label {
  flex: 1 1 0;
  position: relative;
  display: block;
  cursor: pointer;
  min-width: 0;
}

.gk-mg-seg input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.gk-mg-seg span {
  display: block;
  padding: 8px 6px;
  border-radius: 4px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gk-muted);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.gk-mg-seg input:checked + span {
  background: var(--gk-ink);
  color: #fff;
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.25);
}

.gk-mg-seg input:focus-visible + span {
  outline: 2px solid var(--gk-accent);
  outline-offset: 2px;
}

/* 로켓그로스 블록 */
.gk-mg-rg {
  margin-top: 12px;
  padding: 14px 15px 16px;
  border: 1px dashed var(--gk-line-strong);
  border-radius: 8px;
  background: var(--gk-surface);
}

.gk-mg-rg[hidden] { display: none; }

.gk-mg-rg-head {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gk-accent);
}

.gk-mg-rg .gk-mg-field:first-of-type { padding-top: 8px; }
.gk-mg-rg .gk-mg-hint { margin-top: 10px; }

/* ---------------------------------------------------------
   결과 패널
--------------------------------------------------------- */
.gk-mg-summary {
  position: sticky;
  top: 20px;
  padding: 24px 24px 20px;
  border: 1px solid var(--gk-line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 22px 48px -34px rgba(11, 18, 32, 0.5);
  min-width: 0;
}

.gk-mg-sum-title {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gk-muted-2);
}

.gk-mg-hero-num {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gk-line);
}

.gk-mg-hero-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gk-muted);
}

.gk-mg-hero-value {
  margin: 2px 0 8px;
  font-size: clamp(30px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--gk-ink);
  font-variant-numeric: tabular-nums;
}

.gk-mg-hero-value.is-neg { color: #b3261e; }

.gk-mg-hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  font-size: 12.5px;
  color: var(--gk-muted);
}

.gk-mg-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--gk-accent-soft);
  border: 1px solid #d9e4ff;
  color: #1a49c8;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.gk-mg-badge.is-good { background: #e8f6ef; border-color: #bfe6d3; color: #0d7a4f; }
.gk-mg-badge.is-warn { background: #fff5e6; border-color: #ffe0b3; color: #96590a; }
.gk-mg-badge.is-bad { background: #fdecea; border-color: #f7c9c4; color: #b3261e; }

.gk-mg-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

.gk-mg-kpi {
  padding: 10px 12px;
  border: 1px solid var(--gk-line);
  border-radius: 6px;
  min-width: 0;
}

.gk-mg-kpi dt {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--gk-muted);
  letter-spacing: -0.01em;
}

.gk-mg-kpi dd {
  margin: 2px 0 0;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--gk-ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gk-mg-kpi-note {
  margin: 3px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--gk-muted-2);
}

/* ROAS 블록 */
.gk-mg-roas {
  margin-top: 14px;
  padding: 14px 15px 15px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: var(--gk-accent-soft);
}

.gk-mg-roas-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.gk-mg-roas-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1a49c8;
}

.gk-mg-roas-value {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #0b2a8a;
  font-variant-numeric: tabular-nums;
}

.gk-mg-roas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d3defb;
}

.gk-mg-roas-grid div { min-width: 0; }

.gk-mg-roas-grid dt {
  font-size: 10.5px;
  font-weight: 700;
  color: #4a68a8;
}

.gk-mg-roas-grid dd {
  margin: 1px 0 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #0b2a8a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gk-mg-bar {
  position: relative;
  height: 6px;
  margin-top: 12px;
  border-radius: 100px;
  background: #cfdcfb;
  overflow: hidden;
}

.gk-mg-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: #0f4cff;
  transition: width 0.25s ease, background 0.25s ease;
}

.gk-mg-bar-fill.is-over { background: #b3261e; }
.gk-mg-bar-fill.is-safe { background: #0d7a4f; }

.gk-mg-roas-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: #2f4f8f;
}

/* 상세 내역 */
.gk-mg-detail {
  margin-top: 14px;
  border-top: 1px solid var(--gk-line);
}

.gk-mg-detail > summary {
  position: relative;
  padding: 12px 26px 12px 0;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gk-ink-soft);
  cursor: pointer;
  list-style: none;
}

.gk-mg-detail > summary::-webkit-details-marker { display: none; }

.gk-mg-detail > summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--gk-muted-2);
  border-bottom: 2px solid var(--gk-muted-2);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.gk-mg-detail[open] > summary::after { transform: rotate(-135deg); }

.gk-mg-break {
  margin: 0 0 12px;
  font-size: 12.5px;
}

.gk-mg-break-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--gk-line);
}

.gk-mg-break-row:last-child { border-bottom: 0; }

.gk-mg-break-row dt {
  color: var(--gk-muted);
  min-width: 0;
}

.gk-mg-break-row dd {
  margin: 0;
  font-weight: 700;
  color: var(--gk-ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gk-mg-break-head {
  margin: 12px 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gk-muted-2);
}

.gk-mg-break-row.is-sum {
  border-bottom: 0;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid var(--gk-line-strong);
}

.gk-mg-break-row.is-sum dt { color: var(--gk-ink); font-weight: 700; }
.gk-mg-break-row.is-sum dd { color: var(--gk-ink); font-weight: 800; }

/* 총계 */
.gk-mg-total {
  margin-top: 4px;
  padding: 12px 0 0;
  border-top: 1px solid var(--gk-line);
}

.gk-mg-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--gk-muted);
  padding: 3px 0;
}

.gk-mg-total-row strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gk-ink);
  font-variant-numeric: tabular-nums;
}

.gk-mg-total-row.is-profit strong { color: #0d7a4f; }
.gk-mg-total-row.is-profit strong.is-neg { color: #b3261e; }

/* 버튼 */
.gk-mg-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 16px;
}

.gk-mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 16px;
  border: 1px solid var(--gk-ink);
  border-radius: 5px;
  background: var(--gk-ink);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.gk-mg-btn:hover { background: var(--gk-accent); border-color: var(--gk-accent); }
.gk-mg-btn:active { transform: translateY(1px); }

.gk-mg-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }

.gk-mg-btn--ghost {
  padding: 12px 14px;
  background: #fff;
  border-color: var(--gk-line-strong);
  color: var(--gk-muted);
  font-size: 12.5px;
  font-weight: 700;
}

.gk-mg-btn--ghost:hover {
  background: var(--gk-surface);
  color: var(--gk-ink);
  border-color: var(--gk-ink);
}

.gk-mg-btn.is-done {
  background: #0d7a4f;
  border-color: #0d7a4f;
}

.gk-mg-disclaimer {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--gk-muted-2);
}

/* 권장 판매가 */
.gk-mg-reco {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px dashed var(--gk-line-strong);
  border-radius: 6px;
  background: var(--gk-surface);
}

.gk-mg-reco-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gk-muted);
  line-height: 1.45;
}

.gk-mg-reco strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--gk-ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 모바일 미니 바 */
.gk-mg-mini {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 100px;
  background: rgba(11, 18, 32, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 30px -14px rgba(11, 18, 32, 0.9);
}

.gk-mg-mini-strong {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.gk-mg-mini.is-neg { background: rgba(142, 22, 14, 0.95); }

/* ---------------------------------------------------------
   마켓 비교 표
--------------------------------------------------------- */
.gk-mg-compare {
  margin-top: 44px;
}

.gk-mg-compare-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gk-ink);
}

.gk-mg-compare-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.gk-mg-compare-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--gk-muted-2);
}

.gk-mg-table-wrap {
  margin: 16px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gk-mg-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}

.gk-mg-table th,
.gk-mg-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--gk-line);
  text-align: right;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gk-mg-table thead th {
  border-bottom: 1px solid var(--gk-ink);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gk-muted);
  background: transparent;
}

.gk-mg-table th:first-child,
.gk-mg-table td:first-child {
  text-align: left;
  white-space: normal;
}

.gk-mg-table tbody tr.is-current td { background: var(--gk-accent-soft); }
.gk-mg-table tbody tr.is-best td:first-child { font-weight: 800; }

.gk-mg-table .gk-mg-rank {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 100px;
  background: #e8f6ef;
  color: #0d7a4f;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0;
  vertical-align: 1px;
}

.gk-mg-table .is-neg { color: #b3261e; }

.gk-mg-compare-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gk-muted-2);
}

/* ---------------------------------------------------------
   안내 본문
--------------------------------------------------------- */
.gk-mg-guide {
  max-width: var(--gk-reading);
  margin: 0 auto;
  padding-top: 16px;
}

.gk-mg-section {
  margin-top: 56px;
}

.gk-mg-section > h2 {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gk-ink);
  font-size: 23px;
  letter-spacing: -0.03em;
  line-height: 1.4;
}

.gk-mg-section > h3 {
  margin: 2em 0 0.6em;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.gk-mg-section p,
.gk-mg-section li {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--gk-ink-soft);
}

.gk-mg-section p { margin: 0 0 1.25em; }

.gk-mg-section ul,
.gk-mg-section ol {
  margin: 0 0 1.4em;
  padding-left: 1.25em;
}

.gk-mg-section li { margin-bottom: 0.5em; }
.gk-mg-section li::marker { color: var(--gk-muted-2); }

.gk-mg-section a {
  color: var(--gk-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.gk-mg-section strong { color: var(--gk-ink); font-weight: 700; }

.gk-mg-section blockquote {
  margin: 1.8em 0;
  padding: 20px 24px;
  background: var(--gk-surface);
  border-left: 3px solid var(--gk-ink);
  font-size: 16px;
  line-height: 1.8;
  color: var(--gk-ink);
}

.gk-mg-section blockquote p:last-child { margin-bottom: 0; }

.gk-mg-table-2 {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.6;
}

.gk-mg-table-2 th,
.gk-mg-table-2 td {
  padding: 11px 13px;
  border: 1px solid var(--gk-line);
  text-align: left;
  vertical-align: top;
}

.gk-mg-table-2 th {
  background: var(--gk-surface);
  font-weight: 700;
  color: var(--gk-ink);
  white-space: nowrap;
}

.gk-mg-table-2 td { color: var(--gk-ink-soft); }
.gk-mg-table-2 tbody tr:nth-child(even) td { background: #fcfcfd; }

.gk-mg-table-2 code,
.gk-mg-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.94em;
  font-variant-numeric: tabular-nums;
}

.gk-mg-steps {
  counter-reset: gkmgstep;
  margin: 1.6em 0;
  padding: 0;
  list-style: none;
}

.gk-mg-steps li {
  position: relative;
  counter-increment: gkmgstep;
  padding: 0 0 0 46px;
  margin-bottom: 1.1em;
}

.gk-mg-steps li::before {
  content: counter(gkmgstep);
  position: absolute;
  left: 0;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gk-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* FAQ */
.gk-mg-faq {
  margin-top: 1.4em;
  border-top: 1px solid var(--gk-line);
}

.gk-mg-faq details {
  border-bottom: 1px solid var(--gk-line);
}

.gk-mg-faq summary {
  position: relative;
  padding: 18px 36px 18px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--gk-ink);
  line-height: 1.55;
  cursor: pointer;
  list-style: none;
}

.gk-mg-faq summary::-webkit-details-marker { display: none; }

.gk-mg-faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 26px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gk-muted-2);
  border-bottom: 2px solid var(--gk-muted-2);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.gk-mg-faq details[open] summary::after { transform: rotate(-135deg); }
.gk-mg-faq summary:hover { color: var(--gk-accent); }

.gk-mg-faq .gk-mg-answer { padding: 0 0 20px; }

.gk-mg-faq .gk-mg-answer p {
  margin: 0 0 0.9em;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--gk-muted);
}

.gk-mg-faq .gk-mg-answer p:last-child { margin-bottom: 0; }
.gk-mg-faq .gk-mg-answer strong { color: var(--gk-ink); }

/* 다음 단계 카드 */
.gk-mg-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 56px;
}

.gk-mg-next-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 24px 22px;
  border: 1px solid var(--gk-line-strong);
  border-radius: 10px;
  background: var(--gk-surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.gk-mg-next-card:hover {
  border-color: var(--gk-ink);
  box-shadow: 0 16px 36px -28px rgba(11, 18, 32, 0.6);
  transform: translateY(-1px);
}

.gk-mg-next-kicker {
  margin: 0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gk-accent);
}

.gk-mg-next-card h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.03em;
  line-height: 1.4;
}

.gk-mg-next-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--gk-muted);
}

.gk-mg-next-link {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gk-ink);
}

.gk-mg-next-card:hover .gk-mg-next-link { color: var(--gk-accent); }

.gk-mg-footnote {
  max-width: var(--gk-reading);
  margin: 44px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--gk-line);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--gk-muted-2);
}

/* 토스트 */
.gk-mg-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9999;
  padding: 11px 18px;
  border-radius: 100px;
  background: rgba(11, 18, 32, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gk-mg-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------
   반응형
--------------------------------------------------------- */
@media (max-width: 1000px) {
  .gk-mg-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .gk-mg-summary { position: static; }
  .gk-mg-mini { display: flex; }
  .gk-mg-next { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .gk-mg { padding-top: 26px; padding-bottom: 64px; }
  .gk-mg-page { padding-top: 34px; }
  .gk-mg-title { font-size: 26px; }
  .gk-mg-lead { font-size: 15.5px; }
  .gk-mg-card { padding: 18px 16px 16px; border-radius: 8px; }
  .gk-mg-card-head { flex-wrap: wrap; }
  .gk-mg-card-head p { display: none; }
  .gk-mg-card-head h2 { font-size: 16px; }
  .gk-mg-summary { padding: 18px 16px 16px; border-radius: 8px; }
  .gk-mg-hero-value { font-size: 30px; }
  .gk-mg-kpis { gap: 7px; }
  .gk-mg-kpi { padding: 9px 10px; }
  .gk-mg-kpi dd { font-size: 14.5px; }
  .gk-mg-pair { gap: 10px; }
  .gk-mg-pair-tight { gap: 7px; }
  .gk-mg-roas-value { font-size: 21px; }
  .gk-mg-section { margin-top: 44px; }
  .gk-mg-section > h2 { font-size: 20px; }
  .gk-mg-section p,
  .gk-mg-section li { font-size: 15.5px; line-height: 1.82; }
  .gk-mg-table-2 { font-size: 13.5px; }
  .gk-mg-faq summary { font-size: 15px; padding: 16px 32px 16px 0; }
  .gk-mg-faq summary::after { top: 23px; }
  .gk-mg-next-card { padding: 20px 18px; }
  .gk-mg-table { font-size: 12.5px; min-width: 400px; }
  .gk-mg-table th,
  .gk-mg-table td { padding: 9px 10px; }
  /* 좁은 화면에서는 수수료율·물류비를 숨기고 순수익·마진율·ROAS를 먼저 보여준다 */
  .gk-mg-table th:nth-child(2),
  .gk-mg-table td:nth-child(2),
  .gk-mg-table th:nth-child(4),
  .gk-mg-table td:nth-child(4) { display: none; }
  .gk-mg-actions { grid-template-columns: 1fr; }
  .gk-mg-toast { bottom: 76px; }
}
