/* ===== 수강신청 · 결제 ===== */
.pay { padding: 70px 0 110px; background: var(--tint); min-height: 70vh; }
.pay__head { text-align: center; margin-bottom: 44px; }
.pay__head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--navy); }
.pay__head p:last-child { margin-top: 12px; color: var(--muted); }

.pay__grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.pay__main { display: grid; gap: 20px; }
.pay__side { position: sticky; top: 88px; }

.pay-box { margin: 0; border: 0; background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); min-width: 0; }
.pay-box legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 20px; padding: 0; }
.pay-box legend + * { clear: both; }
.pay-box__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; }

/* 상품 */
.plans { display: grid; gap: 12px; }
.plan { position: relative; cursor: pointer; }
.plan input, .method input { position: absolute; opacity: 0; pointer-events: none; }
.plan__body {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "desc price";
  gap: 2px 16px; align-items: center; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 14px; transition: border-color .2s, background .2s;
}
.plan__name { grid-area: name; font-weight: 700; color: var(--navy); font-size: 17px; }
.plan__name em { font-style: normal; color: var(--accent); }
.plan__desc { grid-area: desc; font-size: 14px; color: var(--muted); }
.plan__price { grid-area: price; font-size: 20px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.plan__badge { position: absolute; top: -10px; right: 16px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.plan input:checked + .plan__body { border-color: var(--accent); background: rgba(47,95,208,.05); }
.plan input:focus-visible + .plan__body, .method input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 수강생 정보 */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.field--full { grid-column: 1 / -1; }
.field input {
  font: inherit; font-weight: 400; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; color: var(--text);
}
.field input:focus { outline: none; border-color: var(--accent); }

/* 결제수단 */
.methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.method { cursor: pointer; position: relative; }
.method span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 58px;
  padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 700; font-size: 15px; transition: border-color .2s, background .2s;
}
.method small { font-size: 11px; font-weight: 600; color: var(--muted); }
.method input:checked + span { border-color: var(--accent); background: rgba(47,95,208,.05); }
.method__kakao::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fee500; margin-bottom: 4px; }
.method__naver::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: #03c75a; margin-bottom: 4px; }
.method__paypal { color: #003087; }
.methods__note { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* 요약 */
.summary h2 { font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.summary dl { margin: 0; display: grid; gap: 10px; font-size: 15px; }
.summary dl div { display: flex; justify-content: space-between; gap: 12px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.summary__total strong { font-size: 26px; font-weight: 800; color: var(--accent); }
.agree { display: flex; gap: 8px; align-items: flex-start; margin: 20px 0 14px; font-size: 14px; color: var(--muted); cursor: pointer; }
.agree input { margin-top: 3px; accent-color: var(--accent); }
.agree a { text-decoration: underline; }
.pay__error { background: #fff4f4; color: #c0392b; font-size: 14px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.portone-ui-container { margin-top: 4px; }

/* 환불 규정 */
.refund { margin-top: 48px; background: #fff; border-radius: var(--radius); padding: 28px; }
.refund h2 { font-size: 18px !important; margin: 28px 0 12px; }
.refund h2:first-child { margin-top: 0; }
.refund p { color: var(--muted); font-size: 14px; }
.refund a { text-decoration: underline; }
.refund li { position: relative; padding-left: 14px; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.refund li::before { content: "·"; position: absolute; left: 0; }
.refund .legal__table { overflow-x: auto; margin: 10px 0 14px; }
.refund table { width: 100%; border-collapse: collapse; font-size: 14px; }
.refund th, .refund td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.refund th { background: var(--tint); color: var(--navy); }

/* 결제 결과 */
.result { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 56px 32px; text-align: center; }
.result__icon { font-size: 48px; margin-bottom: 14px; }
.result h1 { font-size: clamp(22px, 3.5vw, 30px); font-weight: 800; color: var(--navy); }
.result > p { margin-top: 12px; color: var(--muted); }
.result__detail { margin: 28px auto 0; max-width: 420px; display: grid; gap: 10px; text-align: left; background: var(--tint); border-radius: 14px; padding: 20px 22px; }
.result__detail div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.result__detail dt { color: var(--muted); }
.result__detail dd { margin: 0; font-weight: 700; word-break: break-all; text-align: right; }
.result__actions { margin-top: 32px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .pay__grid { grid-template-columns: 1fr; }
  .pay__side { position: static; }
}
@media (max-width: 768px) {
  .pay { padding: 44px 0 80px; }
  .pay-box { padding: 22px 18px; }
  .fields { grid-template-columns: 1fr; }
  .methods { grid-template-columns: 1fr 1fr; }
  .plan__body { grid-template-columns: 1fr; grid-template-areas: "name" "desc" "price"; }
  .plan__price { margin-top: 6px; }
}
