/* ============================================================
   JNC 결제 화면 — 아이보리 컨시어지
   아이보리 리넨 · 딥 네이비 잉크 · 샴페인 골드 포인트 · 멤버십 카드
   ============================================================ */
:root {
    --bg: #F5F0E6;
    --bg-deep: #EEE7D9;
    --paper: #FFFDF8;
    --field: #FFFEFB;
    --ink: #1C2541;
    --ink-2: #2E3A5C;
    --sub: #5F6478;
    --faint: #9A9DAD;
    --line: rgba(28, 37, 65, .12);
    --line-strong: rgba(28, 37, 65, .28);
    --gold-1: #B9955A; --gold-2: #E7D3A2; --gold-3: #C9A961; --gold-4: #F3E6C4;
    --gold: linear-gradient(120deg, var(--gold-1) 0%, var(--gold-2) 28%, var(--gold-3) 52%, var(--gold-4) 74%, var(--gold-1) 100%);
    --gold-ink: #8E6F32;
    --danger: #A33A2E;
    --ok: #2F6B4F;
    --serif: 'Noto Serif KR', serif;
    --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --card-shadow: 0 1px 2px rgba(28, 37, 65, .06), 0 16px 36px -14px rgba(28, 37, 65, .30), 0 44px 80px -32px rgba(28, 37, 65, .22);
    --panel-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(28, 37, 65, .04), 0 28px 60px -36px rgba(28, 37, 65, .22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans);
    font-size: 16px;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.55;
    letter-spacing: -.01em;
    word-break: keep-all;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
/* 리넨 결: 아주 옅은 교차선 + 상단 빛 */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1100px 520px at 50% -200px, #FFFDF7 0%, rgba(255, 253, 247, 0) 70%),
        repeating-linear-gradient(0deg, rgba(28, 37, 65, .018) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(28, 37, 65, .014) 0 1px, transparent 1px 4px);
}
button, input, select { font-family: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- 헤더 ---------- */
.mast {
    max-width: 1160px; margin: 0 auto;
    height: 72px; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.mast-l { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mast-l img { width: 30px; height: 30px; object-fit: contain; mix-blend-mode: multiply; }
.mast-l .name { font-size: 13px; font-weight: 700; letter-spacing: .16em; }
.mast-l .name small { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--sub); margin-top: 1px; }
.mast-r { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--sub); }
.mast-r svg { width: 15px; height: 15px; }
.hairline { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.hairline i { display: block; height: 1px; background: linear-gradient(90deg, transparent, rgba(185, 149, 90, .55) 20%, rgba(185, 149, 90, .55) 80%, transparent); }

/* ---------- 2단 레이아웃 ---------- */
.sheet {
    max-width: 1160px; margin: 0 auto;
    padding: 56px 24px 64px;
    display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 72px; align-items: start;
    animation: rise .6s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 좌측: 라운지 (카드 + 주문 요약) */
.lounge { position: sticky; top: 40px; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--gold-ink); }
.kicker::before { content: ''; width: 22px; height: 1px; background: var(--gold-1); }
.lounge h1 { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.22; letter-spacing: -.025em; margin: 14px 0 10px; }
.lounge .lead { color: var(--sub); font-size: 16px; line-height: 1.75; max-width: 420px; }

.slip { margin-top: 28px; max-width: 460px; }
.slip-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.slip-row .k { color: var(--sub); white-space: nowrap; }
.slip-row .v { font-weight: 600; text-align: right; }
.slip-row .v.empty { color: var(--faint); font-weight: 400; }
.slip-row .v.flash { animation: ink-in .45s var(--ease); }
@keyframes ink-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.slip-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; }
.slip-total .k { font-size: 15px; font-weight: 600; }
.amount { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.amount small { font-family: var(--sans); font-size: 17px; font-weight: 600; margin-left: 3px; }
.gold-rule { height: 1px; max-width: 460px; margin-top: 6px; background: linear-gradient(90deg, var(--gold-1), var(--gold-2) 40%, var(--gold-1) 70%, transparent); }
.perks { list-style: none; margin-top: 20px; display: grid; gap: 10px; font-size: 14px; color: var(--sub); }
.perks li { display: flex; gap: 10px; align-items: center; }
.perks li::before { content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--gold); box-shadow: inset 0 0 0 1px rgba(142, 111, 50, .25); }

/* ---------- 멤버십 카드 ---------- */
.card-wrap { margin-top: 36px; perspective: 1200px; max-width: 460px; container-type: inline-size; }
.mcard {
    position: relative; aspect-ratio: 1.586 / 1; border-radius: 18px; padding: 1.5px;
    background: var(--gold); box-shadow: var(--card-shadow);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transform-style: preserve-3d; transition: transform .5s var(--ease); will-change: transform;
}
.mcard-face {
    position: absolute; inset: 1.5px; border-radius: 16.5px; overflow: hidden;
    background: linear-gradient(140deg, #FFFEFA 0%, #F4EEDF 38%, #FBF7EC 62%, #EFE7D5 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(28, 37, 65, .06);
}
.mcard-face .guilloche {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55;
    -webkit-mask-image: radial-gradient(120% 110% at 80% 30%, #000 30%, transparent 85%);
    mask-image: radial-gradient(120% 110% at 80% 30%, #000 30%, transparent 85%);
}
.mcard-face .sheen {
    position: absolute; inset: -40%; pointer-events: none;
    background: radial-gradient(closest-side at var(--mx, 70%) var(--my, 30%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
    mix-blend-mode: soft-light;
}
.mcard-in { position: absolute; inset: 0; padding: 7.2% 7.6%; text-align: left; display: flex; flex-direction: column; justify-content: space-between; }
.mcard-top { display: flex; justify-content: space-between; align-items: flex-start; }
.mcard-brand { font-size: clamp(10px, 2.6cqw, 12px); font-weight: 700; letter-spacing: .22em; color: var(--ink-2); text-shadow: 0 1px 0 rgba(255, 255, 255, .85); }
.mcard-brand span { color: var(--gold-ink); }
.mcard-mark { width: clamp(22px, 7cqw, 32px); height: clamp(22px, 7cqw, 32px); border-radius: 7px; background: rgba(255, 255, 255, .55); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(28, 37, 65, .08); }
.mcard-mark img { width: 70%; height: 70%; object-fit: contain; mix-blend-mode: multiply; }
.chip {
    position: relative; margin-top: 8px;
    width: clamp(30px, 10cqw, 44px); height: clamp(22px, 7.6cqw, 33px); border-radius: 6px;
    background: linear-gradient(135deg, #F1E2B6, #C9A961 45%, #E7D3A2 70%, #B9955A);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8), inset 0 0 0 1px rgba(142, 111, 50, .35);
}
.chip::before, .chip::after { content: ''; position: absolute; left: 0; right: 0; height: 1px; background: rgba(142, 111, 50, .45); }
.chip::before { top: 36%; } .chip::after { top: 64%; }
.chip i { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(142, 111, 50, .45); }
.mcard-product {
    font-family: var(--serif); font-weight: 600; font-size: clamp(17px, 5.4cqw, 25px); letter-spacing: -.02em; line-height: 1.25;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 -1px 0 rgba(28, 37, 65, .10);
}
.mcard-product small { display: block; font-family: var(--sans); font-size: clamp(10px, 2.6cqw, 12px); font-weight: 600; letter-spacing: .08em; color: var(--gold-ink); margin-bottom: 4px; }
.mcard-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.holder { min-width: 0; }
.holder small, .mcard-meta small { display: block; font-size: clamp(9px, 2.3cqw, 11px); font-weight: 600; letter-spacing: .14em; color: var(--faint); margin-bottom: 2px; }
.holder b {
    display: block; font-size: clamp(14px, 4.3cqw, 19px); font-weight: 700; letter-spacing: .06em; color: var(--ink-2);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 -1px 0 rgba(28, 37, 65, .10);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.holder b.placeholder { color: var(--faint); letter-spacing: .18em; font-weight: 600; }
.mcard-meta { text-align: right; flex: none; }
.mcard-meta b { display: block; font-size: clamp(12px, 3.4cqw, 15px); font-weight: 700; letter-spacing: .06em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mcard.issued { animation: issue .9s var(--ease) both; }
@keyframes issue { from { opacity: 0; transform: translateY(16px) rotateX(18deg); } to { opacity: 1; transform: none; } }

/* ---------- 우측: 입력 패널 ---------- */
.panel-wrap {
    position: relative; background: var(--paper);
    border: 1px solid var(--line); border-radius: 22px;
    box-shadow: var(--panel-shadow);
    padding: 34px 36px 30px; overflow: hidden;
}
.panel-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold); }

.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 4px 0 30px; }
.step { font-size: 14px; color: var(--faint); min-width: 0; transition: color .3s; }
.step .no { display: block; font-family: var(--serif); font-size: 13px; font-weight: 600; letter-spacing: .04em; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.step::after { content: ''; display: block; height: 2px; border-radius: 2px; background: rgba(28, 37, 65, .10); margin-top: 10px; transition: background .3s; }
.step.active { color: var(--ink); font-weight: 600; }
.step.active .no { color: var(--gold-ink); }
.step.active::after { background: var(--gold); height: 3px; box-shadow: 0 1px 4px rgba(185, 149, 90, .35); }
.step.done { color: var(--sub); }
.step.done .no::after { content: ' ✓'; font-family: var(--sans); color: var(--gold-ink); }
.step.done::after { background: var(--gold-1); opacity: .55; }

.panel { animation: page-in .45s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sec-title { font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
.sec-desc { color: var(--sub); font-size: 15px; margin: 6px 0 26px; line-height: 1.6; }

/* 입력 필드 */
.field { margin-bottom: 20px; }
.field > label { display: flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 600; margin-bottom: 9px; }
.field > label em, .req { font-style: normal; color: var(--gold-ink); font-size: 13px; font-weight: 600; }
.control { position: relative; }
.control input {
    width: 100%; height: 58px; padding: 0 50px 0 18px;
    border: 1.5px solid var(--line-strong); border-radius: 14px;
    background: var(--field); font-size: 17px; font-weight: 500; letter-spacing: -.01em;
    outline: none; -webkit-appearance: none;
    box-shadow: inset 0 1px 2px rgba(28, 37, 65, .04);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.control input::placeholder { color: #B4B6C2; font-weight: 400; }
.control input:hover { border-color: rgba(28, 37, 65, .45); }
.control input:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(28, 37, 65, .08), inset 0 1px 2px rgba(28, 37, 65, .04); }
.control .ok {
    position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
    border-radius: 50%; background: var(--gold); display: grid; place-items: center;
    opacity: 0; transform: scale(.7); transition: opacity .2s, transform .25s var(--ease);
}
.control .ok svg { width: 12px; height: 12px; }
.control.filled .ok { opacity: 1; transform: scale(1); }
.field .hint { font-size: 14px; color: var(--faint); margin-top: 7px; }
.field .err { display: none; font-size: 14px; color: var(--danger); margin-top: 7px; font-weight: 500; }
.field.invalid input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(163, 58, 46, .08); }
.field.invalid .err { display: block; }
.field.invalid .hint { display: none; }

/* 회원 선택 */
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice {
    position: relative; display: block; cursor: pointer; min-width: 0;
    min-height: 92px; padding: 18px 16px 16px 50px;
    border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--field);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice::before {
    content: ''; position: absolute; left: 17px; top: 21px; width: 20px; height: 20px; border-radius: 50%;
    border: 1.5px solid var(--line-strong); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.choice .c-title { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; }
.choice .c-desc { display: block; font-size: 14px; color: var(--sub); margin-top: 4px; line-height: 1.45; }
.choice:hover { border-color: rgba(28, 37, 65, .45); }
.choice.selected { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(28, 37, 65, .07), 0 10px 24px -16px rgba(28, 37, 65, .35); }
.choice.selected::before { border-color: var(--ink); box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 11px var(--gold-3); }
.choice:has(input:focus-visible) { outline: 3px solid rgba(201, 169, 97, .55); outline-offset: 2px; }

.confirm-box {
    display: none; margin-top: 18px; padding: 18px 20px;
    background: #FBF7EE; border: 1px solid rgba(185, 149, 90, .35); border-radius: 14px;
}
.confirm-box.show { display: block; animation: page-in .35s var(--ease); }
.confirm-box .who { font-size: 15px; color: var(--ink-2); line-height: 1.65; margin-bottom: 14px; }
.confirm-box .who-id { display: block; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); margin-top: 6px; }

/* 체크박스 */
.check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
    flex: none; width: 22px; height: 22px; margin-top: 1px;
    border: 1.5px solid var(--line-strong); border-radius: 6px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, border-color .2s;
}
.check .box svg { width: 12px; height: 12px; opacity: 0; transition: opacity .15s; }
.check input:checked + .box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 3px solid rgba(201, 169, 97, .55); outline-offset: 2px; }
.check.strong { font-weight: 700; font-size: 16px; color: var(--ink); }
.check-err { display: none; color: var(--danger); font-size: 14px; margin-top: 10px; font-weight: 500; }
.check-err.show { display: block; }

/* 결제 확인 요약 */
.summary { border: 1px solid var(--line); border-radius: 16px; background: var(--field); padding: 4px 20px; }
.summary-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.summary-row:last-child { border-bottom: 0; }
.summary-row .k { color: var(--sub); white-space: nowrap; }
.summary-row .v { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.summary-row .edit {
    margin-left: 10px; padding: 3px 9px;
    background: none; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
    font-size: 13px; font-weight: 500; color: var(--sub);
}
.summary-row .edit:hover { border-color: var(--ink); color: var(--ink); }
.summary-row.total { padding: 16px 0 14px; }
.summary-row.total .k { color: var(--ink); font-weight: 600; }
.summary-row.total .v { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.label-sm { font-size: 15px; font-weight: 600; margin: 26px 0 10px; }
.method {
    display: flex; align-items: center; gap: 16px; padding: 16px 18px;
    border: 1.5px solid var(--ink); border-radius: 14px; background: #fff;
}
.method .icon {
    flex: none; position: relative; width: 46px; height: 30px; border-radius: 6px;
    background: linear-gradient(140deg, #FFFEFA, #EFE7D5); box-shadow: inset 0 0 0 1px rgba(185, 149, 90, .6);
}
.method .icon::before { content: ''; position: absolute; left: 7px; top: 8px; width: 11px; height: 8px; border-radius: 2px; background: linear-gradient(135deg, #F1E2B6, #C9A961); }
.method .m-title { display: block; font-size: 16px; font-weight: 700; }
.method .m-desc { display: block; font-size: 14px; color: var(--sub); }

.agree-box { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); }
.agree-box .sub { margin: 14px 0 0 33px; display: grid; gap: 10px; }
.agree-box .sub .check { font-size: 14px; color: var(--sub); }
.agree-box .sub .check .box { width: 19px; height: 19px; }
.terms-toggle {
    background: none; border: none; cursor: pointer; margin-left: 6px;
    color: var(--gold-ink); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.terms { display: none; margin: 10px 0 0 33px; padding: 12px 14px; font-size: 13px; color: var(--sub); line-height: 1.8; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.terms.show { display: block; }

/* ---------- 버튼 ---------- */
.btn {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 60px; padding: 0 22px;
    border: 0; border-radius: 15px;
    font-size: 17px; font-weight: 700; letter-spacing: -.01em;
    cursor: pointer; text-decoration: none;
    transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s;
}
.btn .arr { display: inline-flex; transition: transform .25s var(--ease); }
.btn .arr svg { width: 18px; height: 18px; }
.btn:hover .arr { transform: translateX(3px); }
.btn:focus-visible { outline: 3px solid rgba(201, 169, 97, .6); outline-offset: 3px; }
.btn-primary, .btn-pay {
    background: linear-gradient(180deg, #26325A, #1C2541); color: #FBF7EC;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 14px 28px -14px rgba(28, 37, 65, .6);
}
.btn-primary::before, .btn-pay::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1.5px; background: var(--gold); opacity: .9; }
.btn-primary:hover, .btn-pay:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 18px 34px -14px rgba(28, 37, 65, .65); }
.btn-primary:active, .btn-pay:active { transform: none; }
.btn-primary:disabled, .btn-pay:disabled { background: #A6A9B8; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-pay { height: 64px; justify-content: space-between; padding: 0 24px; }
.btn-pay .amt { font-family: var(--serif); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.btn-ghost { height: 50px; background: transparent; color: var(--sub); font-size: 15px; font-weight: 600; }
.btn-ghost:hover { color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); background: #fff; }
.btn-kakao { height: 64px; background: #FEE500; color: #191600; box-shadow: 0 14px 28px -16px rgba(120, 100, 0, .55); }
.btn-kakao:hover { background: #F7DD00; transform: translateY(-1px); }
.btn-kakao .lbl { display: flex; align-items: center; gap: 10px; }
.btn-kakao svg { width: 22px; height: 22px; }
.actions { margin-top: 28px; display: grid; gap: 6px; }

/* ---------- 알림 ---------- */
.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 14px 16px; margin-bottom: 22px; border-radius: 12px;
    font-size: 15px; line-height: 1.55;
}
.alert-danger { color: var(--danger); background: #FBEFEC; border: 1px solid rgba(163, 58, 46, .25); }
.alert-info { color: var(--gold-ink); background: #FBF5E6; border: 1px solid rgba(185, 149, 90, .35); }

/* ---------- 신뢰 문구 / 하단 ---------- */
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 18px; font-size: 14px; color: var(--sub); }
.trust span { display: flex; align-items: center; gap: 6px; }
.trust svg { width: 14px; height: 14px; flex: none; }
.trust span + span::before { content: '·'; color: var(--faint); margin-right: 8px; }
.foot { max-width: 1160px; margin: 0 auto; padding: 0 24px 32px; text-align: center; font-size: 14px; color: var(--faint); line-height: 1.7; }
.foot .rule { height: 1px; margin-bottom: 22px; background: linear-gradient(90deg, transparent, rgba(185, 149, 90, .5) 30%, rgba(185, 149, 90, .5) 70%, transparent); }

/* ---------- 로딩 / 오버레이 ---------- */
.ring {
    width: 52px; height: 52px; margin: 0 auto 22px; border-radius: 50%;
    border: 2px solid rgba(185, 149, 90, .25); border-top-color: var(--gold-1);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay {
    position: fixed; inset: 0; z-index: 90;
    display: none; align-items: center; justify-content: center; text-align: center;
    background: rgba(245, 240, 230, .94); backdrop-filter: blur(4px);
}
.overlay.show { display: flex; }
.overlay p { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.overlay small { display: block; margin-top: 6px; font-size: 14px; color: var(--sub); }

/* ---------- 단일 화면 (결제창 호출 / 결과 / 완료) ---------- */
.solo { max-width: 560px; margin: 0 auto; padding: 48px 24px 56px; animation: rise .6s var(--ease) both; }
.solo-head { text-align: center; margin-bottom: 32px; }
.solo-head .kicker { justify-content: center; }
.solo-head .kicker::before { display: none; }
.solo-head .headline { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.3; letter-spacing: -.025em; margin: 12px 0 10px; }
.solo-head .sub { font-size: 16px; color: var(--sub); line-height: 1.75; }
.solo .card-wrap { max-width: 380px; margin: 0 auto 28px; }

.receipt {
    position: relative; overflow: hidden;
    background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: var(--panel-shadow); padding: 24px 24px 20px;
}
.receipt::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold); }
.receipt .summary { border: 0; padding: 0; background: none; }
.receipt-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.receipt-top .kicker::before { display: none; }
.receipt-top .rno { font-size: 13px; color: var(--faint); margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stamp {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: 999px;
    font-size: 14px; font-weight: 700; color: var(--ok);
    background: rgba(47, 107, 79, .08); border: 1px solid rgba(47, 107, 79, .25);
}
.stamp::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stamp.void { color: var(--danger); background: rgba(163, 58, 46, .07); border-color: rgba(163, 58, 46, .25); }
.receipt-note { font-size: 13px; color: var(--faint); margin-top: 10px; }

.chapter {
    margin-top: 22px; position: relative; overflow: hidden;
    background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: var(--panel-shadow); padding: 26px 24px 24px;
    animation: rise .6s .2s var(--ease) both;
}
.chapter-head { margin-bottom: 8px; }
.chapter-head .kicker::before { display: none; }
.chapter-head .sec-title { margin-top: 6px; }
.chapter-desc { font-size: 15px; color: var(--sub); line-height: 1.7; margin-bottom: 18px; }
.guide { list-style: none; counter-reset: g; margin: 0 0 22px; display: grid; gap: 10px; }
.guide li { counter-increment: g; display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--ink-2); }
.guide li::before {
    content: counter(g); flex: none; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; font-family: var(--serif); font-size: 13px; font-weight: 600;
    color: var(--gold-ink); background: #FBF5E6; box-shadow: inset 0 0 0 1px rgba(185, 149, 90, .45);
}
.guide-sub { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }
.join-code {
    display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 14px 16px;
    background: #FBF5E6; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(185, 149, 90, .45);
}
.jc-label { font-size: 14px; font-weight: 600; color: var(--gold-ink); }
.jc-value { flex: 1; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .12em; color: var(--ink); font-variant-numeric: tabular-nums; }
.jc-copy {
    flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--ink); color: #FBF7EC; font-size: 14px; font-weight: 700;
}
.joined-note { margin-top: 12px; font-size: 14px; color: var(--ok); text-align: center; }
.joined-note.wait { color: var(--sub); }
.counsel {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 22px auto 0; padding: 13px 18px; border-radius: 14px;
    background: var(--paper); color: var(--sub); text-decoration: none; font-size: 14px; line-height: 1.45;
    box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, color .2s;
}
.counsel svg { width: 18px; height: 18px; flex: none; color: #3A1D1D; background: #FEE500; border-radius: 6px; padding: 3px; box-sizing: content-box; }
.counsel b { color: var(--ink); }
.counsel:hover { box-shadow: inset 0 0 0 1.5px var(--gold-1); color: var(--ink); }
.solo .fine { margin-top: 26px; text-align: center; font-size: 14px; color: var(--faint); line-height: 1.7; }

.status-mark {
    width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.status-mark svg { width: 28px; height: 28px; }
.status-mark.ok { color: var(--gold-ink); background: #FBF5E6; box-shadow: inset 0 0 0 1.5px rgba(185, 149, 90, .6); }
.status-mark.fail { color: var(--danger); background: #FBEFEC; box-shadow: inset 0 0 0 1.5px rgba(163, 58, 46, .35); }

/* ---------- 테디 대화 헤더 (결제 단계마다 테디가 질문 · 입력에 반응) ---------- */
.talk { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 26px; }
.talk-teddy {
    flex: none; width: 104px; height: auto;
    filter: drop-shadow(0 8px 12px rgba(60, 40, 20, .18));
    transform-origin: 50% 100%;
    animation: teddy-idle 4.2s 1s ease-in-out infinite;
}
.talk.bounce .talk-teddy { animation: teddy-boing .6s var(--ease), teddy-idle 4.2s 1.6s ease-in-out infinite; }
.talk.oops .talk-teddy { animation: teddy-shake .5s ease-in-out; }
@keyframes teddy-boing { 0% { transform: scale(.82) translateY(10px); } 55% { transform: scale(1.07) translateY(-5px); } 100% { transform: none; } }
.talk-bubble {
    position: relative; flex: 1; min-width: 0; margin-bottom: 18px;
    padding: 16px 18px 15px;
    background: #FBF5E6; border-radius: 20px 20px 20px 6px;
    box-shadow: inset 0 0 0 1.5px rgba(185, 149, 90, .45), 0 12px 26px -18px rgba(60, 40, 20, .45);
    transition: background .25s, box-shadow .25s;
}
.talk-bubble::before {   /* 테디 쪽 꼬리 */
    content: ''; position: absolute; left: -7px; bottom: 12px; width: 14px; height: 14px;
    background: inherit; transform: rotate(45deg); border-radius: 2px;
    box-shadow: inset 1.5px -1.5px 0 0 rgba(185, 149, 90, .45);
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.talk.bounce .talk-bubble { animation: bubble-pop .45s var(--ease); }
.talk-title { font-size: 21px; font-weight: 800; line-height: 1.38; letter-spacing: -.03em; color: var(--ink); }
.talk-sub { font-size: 14px; color: var(--sub); margin-top: 6px; line-height: 1.55; }
.talk.happy .talk-bubble { background: #F1F5EC; box-shadow: inset 0 0 0 1.5px rgba(47, 107, 79, .35), 0 12px 26px -18px rgba(47, 107, 79, .45); }
.talk.happy .talk-title { color: #24543E; }
.talk.oops .talk-bubble { background: #FBEFEC; box-shadow: inset 0 0 0 1.5px rgba(163, 58, 46, .35), 0 12px 26px -18px rgba(163, 58, 46, .45); }
.talk.oops .talk-title { color: var(--danger); }
.talk.happy .talk-sub, .talk.oops .talk-sub { display: none; }

/* ---------- 테디 (안내 캐릭터) ---------- */
.panel-stage { position: relative; }
.teddy-host {
    position: absolute; top: 0; right: 22px; left: 22px; height: 100px;
    display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px;
    pointer-events: none; z-index: 1;
}
.teddy-peek {
    width: 132px; height: auto; flex: none;
    margin-bottom: -14px;                       /* 패널 윗변에 앞발을 걸친 모습 */
    filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .18));
    transform-origin: 50% 100%;
    animation: teddy-in .7s .2s var(--ease) both, teddy-idle 4.2s 1.2s ease-in-out infinite;
}
@keyframes teddy-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes teddy-idle { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-3deg) translateY(-2px); } }
.teddy-host.oops .teddy-peek { animation: teddy-shake .5s ease-in-out; }
@keyframes teddy-shake { 0%, 100% { transform: none; } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

.teddy-bubble {
    position: relative; max-width: 300px; margin-bottom: 30px;
    padding: 11px 15px; border-radius: 16px 16px 4px 16px;
    background: var(--paper); color: var(--ink);
    font-size: 14.5px; font-weight: 600; line-height: 1.5; letter-spacing: -.015em;
    box-shadow: 0 10px 24px -14px rgba(28, 37, 65, .45), inset 0 0 0 1px rgba(185, 149, 90, .45);
}
.teddy-bubble.pop { animation: bubble-pop .45s var(--ease); }
@keyframes bubble-pop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.teddy-host.oops .teddy-bubble { color: var(--danger); box-shadow: 0 10px 24px -14px rgba(163, 58, 46, .45), inset 0 0 0 1px rgba(163, 58, 46, .35); }

/* 단일 화면용 테디 (결제창 호출 안내 · 결제완료) */
.teddy-say { display: flex; align-items: flex-end; gap: 10px; }
.teddy-say img { flex: none; height: auto; filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .16)); }
.teddy-say .teddy-bubble { margin-bottom: 18px; border-radius: 16px 16px 16px 4px; }
.popup-guide .teddy-say { float: right; margin: -6px -6px 6px 12px; }
.popup-guide .teddy-say img { width: 96px; }
.chapter-stage { margin-top: 14px; padding-top: 118px; }
.chapter-stage .chapter { margin-top: 0; }
.chapter-stage .teddy-host { height: 124px; }
.teddy-stand {
    width: 96px; height: auto; flex: none; margin-bottom: -4px;   /* 박스 윗변에 서 있는 모습 */
    filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .18));
    transform-origin: 50% 100%;
    animation: teddy-in .7s .5s var(--ease) both, teddy-hop 2.4s 1.4s ease-in-out infinite;
}
@keyframes teddy-hop { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-7px); } 80% { transform: none; } 88% { transform: translateY(-3px); } }
.chapter-stage .teddy-bubble { margin-bottom: 52px; }

/* ---------- 이미 결제한 번호 안내 (중복 결제 방지) ---------- */
.dup-overlay {
    position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(28, 37, 65, .45); backdrop-filter: blur(3px);
}
.dup-modal {
    position: relative; width: min(420px, 100%); text-align: center;
    background: var(--paper); border-radius: 22px; padding: 30px 24px 22px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); animation: rise .35s var(--ease) both;
}
.dup-modal::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 22px 22px 0 0; background: var(--gold); }
.dup-teddy { width: 84px; height: auto; margin: -2px auto 8px; display: block; }
.dup-modal h2 { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.dup-modal p { font-size: 15px; color: var(--sub); line-height: 1.65; margin: 10px 0 20px; }
.dup-modal p b { color: var(--ink); }
.dup-msg { margin-top: 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.dup-msg.ok { background: #F1F5EC; color: #24543E; } .dup-msg.err { background: #FBEFEC; color: var(--danger); }
.dup-again { margin-top: 14px; background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--faint); text-decoration: underline; text-underline-offset: 3px; }
.dup-again:hover { color: var(--sub); }

/* ---------- 팝업 허용 안내 (PC 카드사 인증창) ---------- */
.popup-guide {
    margin-bottom: 22px; padding: 22px 22px 20px;
    background: #FBF5E6; border: 1px solid rgba(185, 149, 90, .45); border-radius: 18px;
}
.popup-guide .pg-badge {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 700; color: #fff; background: var(--gold-ink);
}
.popup-guide h2 { font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -.02em; margin: 12px 0 6px; }
.popup-guide p { font-size: 15px; color: var(--sub); line-height: 1.6; }
.popup-guide ol { list-style: none; counter-reset: s; margin-top: 16px; display: grid; gap: 12px; }
.popup-guide li { counter-increment: s; position: relative; padding-left: 38px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.popup-guide li::before {
    content: counter(s); position: absolute; left: 0; top: -1px;
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    font-family: var(--serif); font-size: 13px; font-weight: 600; color: #fff; background: var(--ink);
}
.popup-guide li small { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }

/* 결제창(레이어, z-index 10000) 위에 뜨는 도움 바 */
.pg-help {
    position: fixed; left: 0; right: 0; bottom: 20px; z-index: 10001;
    margin: 0 auto;
    width: min(720px, calc(100% - 32px));
    display: flex; align-items: center; gap: 16px;
    padding: 14px 14px 14px 20px;
    background: var(--paper); border-radius: 16px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(185, 149, 90, .45);
    animation: rise .35s var(--ease) both;
}
.pg-help-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--sub); }
.pg-help-text > b { display: block; font-size: 15px; color: var(--ink); }
.pg-help-text span b { color: var(--ink); }
.pg-help.attention { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45), inset 0 0 0 2px var(--gold-1); animation: rise .35s var(--ease) both, nudge 1.6s .4s ease-in-out 2; }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(-6px); } }
.pg-help-btn {
    flex: none; height: 46px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
    background: linear-gradient(180deg, #26325A, #1C2541); color: #FBF7EC; font-size: 15px; font-weight: 700;
}
.pg-help-btn:hover { filter: brightness(1.12); }

/* ---------- 모바일 ---------- */
@media (max-width: 920px) {
    .mast { height: 60px; padding: 0 20px; }
    .mast-l .name small { display: none; }
    .hairline { padding: 0 20px; }
    .sheet { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 20px 40px; }
    .lounge { position: static; text-align: center; }
    .lounge .kicker { justify-content: center; }
    .lounge .kicker::before { display: none; }
    .lounge h1 { font-size: 30px; margin: 8px 0 0; }
    .lounge .lead, .lounge .perks, .slip-row { display: none; }
    .lounge .card-wrap { max-width: 320px; margin: 22px auto 0; }
    .slip { max-width: 320px; margin: 16px auto 0; }
    .slip-total { padding-top: 6px; }
    .amount { font-size: 28px; }
    .gold-rule { max-width: 320px; margin: 4px auto 0; }
    .panel-wrap { padding: 26px 20px 22px; border-radius: 20px; scroll-margin-top: 12px; }
    .stepper { gap: 6px; margin-bottom: 24px; }
    .sec-title { font-size: 21px; }
    .choice-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .choice { min-height: 0; padding: 16px 16px 15px 50px; }
    .choice::before { top: 18px; }
    .summary { padding: 2px 16px; }
    .summary-row { font-size: 14px; }
    .summary-row.total .v { font-size: 24px; }
    .btn-pay .amt { font-size: 18px; }
    .talk { gap: 6px; margin-bottom: 22px; }
    .talk-teddy { width: 84px; }
    .talk-bubble { padding: 14px 15px 13px; margin-bottom: 14px; }
    .talk-title { font-size: 19px; }
    .talk-sub { font-size: 13.5px; }
    .teddy-host { right: 10px; left: 0; height: 84px; }
    .teddy-bubble { max-width: 230px; margin-bottom: 26px; padding: 9px 13px; font-size: 14px; }
    .popup-guide .teddy-say img { width: 78px; }
    .chapter-stage { padding-top: 104px; }
    .chapter-stage .teddy-host { height: 110px; }
    .teddy-stand { width: 84px; }
    .chapter-stage .teddy-bubble { margin-bottom: 44px; }
    .trust { gap: 4px 12px; font-size: 13px; }
    .trust span + span::before { display: none; }
    .solo { padding: 28px 20px 44px; }
    .solo-head .headline { font-size: 28px; }
    .solo .card-wrap { max-width: 300px; }
    .receipt, .chapter { padding: 22px 18px 18px; }
}
@media (max-width: 360px) {
    .step { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .mcard { transform: none !important; }
}
