/* 요금제·결제(PRICING-01) 전용 스타일
   공통 토큰·프리미티브(.container/.btn/.badge/.eyebrow는 landing과 동일 정의)는 common.css 에서 로드됨 */

/* 랜딩과 동일한 eyebrow 배지 */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--brand);
  background: var(--brand-tint);
  border-radius: 20px; padding: 5px 13px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* 본문 래퍼: 내용이 짧아도 푸터가 화면 바닥에 붙도록 */
body { display: flex; flex-direction: column; min-height: 100vh; }
.pricing-main { flex: 1 0 auto; padding: 56px 0 84px; background: linear-gradient(var(--surface-2), #fff 480px); }
.site-footer { flex-shrink: 0; }

/* 페이지 헤드 */
.pc-head { text-align: center; }
.pc-title {
  margin-top: 18px;
  font-size: 38px; font-weight: 800;
  letter-spacing: -.035em; color: var(--ink);
}
.pc-lead { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* 월간/연간 토글 */
.pc-toggle {
  margin: 26px auto 0;
  width: fit-content;
  display: inline-flex; gap: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
}
.pc-toggle-btn {
  border: 0; background: none;
  padding: 9px 18px; border-radius: 9px;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
}
.pc-toggle-btn.is-active { background: var(--brand); color: #fff; }
.pc-toggle-tag {
  font-size: 10.5px; font-weight: 800;
  background: rgba(255, 255, 255, .22);
  border-radius: 12px; padding: 2px 8px;
}
.pc-toggle-btn:not(.is-active) .pc-toggle-tag { background: var(--brand-tint); color: var(--brand); }

/* 플랜 카드 */
.pc-grid {
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  align-items: stretch;
}
.pc-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  display: flex; flex-direction: column;
}
.pc-card.is-featured {
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-card);
}
.pc-popular {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 800;
  border-radius: 20px; padding: 4px 14px;
  white-space: nowrap;
}
.pc-plan {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; color: var(--ink);
}
.pc-dot { width: 9px; height: 9px; border-radius: 3px; }
.pc-dot-free { background: var(--faint); }
.pc-dot-pro { background: var(--ok); }
.pc-dot-ent { background: var(--brand-dark); }
.pc-desc { margin-top: 4px; font-size: 12.5px; color: var(--muted-2); }
.pc-price { margin-top: 22px; display: flex; align-items: baseline; gap: 4px; }
.pc-price strong {
  font-size: 38px; font-weight: 800; letter-spacing: -.02em; color: var(--ink);
}
.pc-price .pc-price-text { font-size: 32px; }
.pc-per { font-size: 14px; color: var(--muted); font-weight: 600; }
.pc-price-sub { margin-top: 5px; font-size: 12.5px; color: var(--faint); min-height: 1.2em; }
.pc-cta { margin-top: 22px; height: 46px; font-size: 14px; width: 100%; }
/* 이미 Pro인 회원: 신규 결제 대신 현재 요금제임을 알리는 비활성 상태 */
.pc-cta-current,
.pc-cta-current:hover {
  background: var(--brand-tint); color: var(--brand-dark);
  cursor: default; filter: none; box-shadow: none; opacity: 1;
}
.pc-features {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 11px;
  font-size: 13px; color: var(--text-soft);
}
.pc-features li { display: flex; align-items: flex-start; gap: 8px; }
.pc-features li::before {
  content: "\2713";
  flex: 0 0 auto;
  color: var(--ok); font-weight: 800; font-size: 12px;
  margin-top: 1px;
}

/* 기능 비교 표 */
.pc-compare { margin-top: 64px; }
.pc-compare-title { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.pc-table-wrap {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow-x: auto;
}
.pc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.pc-table th, .pc-table td { padding: 13px 18px; text-align: center; }
.pc-table thead th {
  background: var(--surface);
  font-size: 12.5px; font-weight: 800; color: var(--text-soft);
  border-bottom: 1px solid var(--line-soft);
}
.pc-table thead th:first-child { text-align: left; }
.pc-table tbody th {
  text-align: left; font-weight: 600; color: var(--text);
}
.pc-table tbody tr + tr th, .pc-table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.pc-table td { color: var(--muted); }
.pc-col-pro { background: var(--surface-2); font-weight: 700; color: var(--text); }
.pc-table thead .pc-col-pro { color: var(--brand); }
.pc-yes { color: var(--ok); font-weight: 800; }
.pc-none { color: #cfc4bc; }

/* 하단 다크 배너 (랜딩 지표 바와 같은 톤) */
.pc-banner {
  margin-top: 44px;
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 34px 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.pc-banner-copy h2 { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.pc-banner-copy p { margin-top: 7px; font-size: 13.5px; color: rgba(255, 255, 255, .66); }
.pc-banner-cta { flex: 0 0 auto; height: 46px; padding: 0 24px; font-size: 14px; }

/* 결제 결과 페이지 래퍼 (success / fail) */
.co-wrap { max-width: 920px; }
.container.co-wrap { margin: 0 auto; }
.co-rows { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.co-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.co-row dt { color: var(--muted); }
.co-row dd { font-weight: 700; color: var(--text); }

/* 결제 모달 */
.pm-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(35, 29, 26, .45);
  backdrop-filter: blur(3px);
  animation: pmFade .18s ease;
}
.pm-backdrop[hidden] { display: none; } /* display:flex가 hidden 기본값을 덮지 않게. 없으면 진입하자마자 모달이 뜬다 */
.pm-modal {
  width: 100%; max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(35, 29, 26, .3);
  padding: 24px 24px 20px;
  animation: pmUp .24s cubic-bezier(.22, 1, .36, 1);
}
@keyframes pmFade { from { opacity: 0; } }
@keyframes pmUp { from { opacity: 0; transform: translateY(16px); } }

.pm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pm-title { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.pm-sub { margin-top: 4px; font-size: 12.5px; color: var(--faint); }
.pm-close {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted);
  font-size: 20px; line-height: 1;
}
.pm-close:hover { background: var(--brand-tint); color: var(--brand); }

.pm-cycle {
  margin-top: 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 4px;
}
.pm-cycle-btn {
  border: 0; background: none;
  padding: 9px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.pm-cycle-btn.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(90, 45, 28, .1); }
.pm-cycle-tag {
  font-size: 10px; font-weight: 800;
  background: var(--brand-tint); color: var(--brand);
  border-radius: 10px; padding: 2px 7px;
}

.pm-summary {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 16px;
}
.pm-summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pm-summary-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.pm-summary-name em { font-style: normal; color: var(--brand); }
.pm-summary-amount { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.pm-summary-calc { margin-top: 6px; font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.pm-save {
  font-size: 10.5px; font-weight: 800;
  background: var(--ok-bg); color: var(--ok);
  border-radius: 10px; padding: 2px 8px;
}

/* 2단계: 뒤로가기 + 결제 요약 라인 */
.pm-back {
  margin-top: 14px;
  border: 0; background: none;
  padding: 0;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.pm-back::before { content: "\2190"; margin-right: 5px; }
.pm-back:hover { color: var(--brand); }
.pm-payline {
  margin-top: 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 16px;
}

.pm-widget { margin-top: 6px; min-height: 60px; }
.pm-widget-loading {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 30px 0;
  font-size: 13px; color: var(--muted);
}
.pm-widget-loading[hidden] { display: none; } /* display:flex가 hidden 기본값을 덮지 않게 */
.pm-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%;
  animation: pmSpin .8s linear infinite;
}
@keyframes pmSpin { to { transform: rotate(360deg); } }

.pm-error {
  margin: 4px 4px 0;
  background: var(--danger-bg); color: var(--danger);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12.5px; font-weight: 600;
}
.pm-pay { width: 100%; margin-top: 12px; height: 48px; font-size: 15px; }
.pm-note { margin-top: 10px; text-align: center; font-size: 11.5px; color: var(--faint); }

/* 모바일: 바텀시트로 전환 */
@media (max-width: 640px) {
  .pm-backdrop { padding: 0; align-items: flex-end; }
  .pm-modal {
    max-width: none;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

/* 결제 결과 (success / fail) */
.co-result { display: flex; justify-content: center; }
.co-result-loading { padding: 80px 0; color: var(--muted); }
.co-result-card {
  width: 100%; max-width: 480px;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
}
.co-result-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  font-size: 24px; font-weight: 800;
}
.co-result-icon-fail { background: var(--danger-bg); color: var(--danger); }
.co-result-icon-pending { background: var(--warn-bg); color: var(--warn); }
.co-result-title { margin-top: 16px; font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.co-result-sub { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.co-result-rows { margin-top: 24px; text-align: left; }
.co-result-actions {
  margin-top: 26px;
  display: flex; justify-content: center; gap: 10px;
}
.co-result-actions .btn { height: 44px; padding: 0 22px; font-size: 14px; }

/* 푸터 (랜딩과 동일 패턴) */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px;
  padding: 34px 24px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-nav { display: flex; gap: 22px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.footer-nav a:hover { color: var(--brand); }
.footer-copy { margin-left: auto; font-size: 12.5px; color: var(--faint); }

/* 반응형 · 태블릿 */
@media (max-width: 900px) {
  .pc-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .pc-card.is-featured { order: -1; }
  .co-grid { grid-template-columns: 1fr; }
  .pc-banner { flex-direction: column; text-align: center; }
}

/* 반응형 · 모바일 (1열 · 햄버거) */
@media (max-width: 640px) {
  .pricing-main { padding: 36px 0 60px; }
  .pc-title { font-size: 28px; }
  .co-result-actions { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { margin-left: 0; }
}
