/* 페이스튜디오 모바일 — 링크결제 (안 2 : 히어로 그라데이션) */

/* 페이지 한정 흰 배경 — 다른 화면(--pm-bg)에는 영향 없음 */
.pm-main:has(.pml),
.pm-main:has(.pml-detail),
.pm-main:has(.pmf),
.pm-app:has(.pml),
.pm-app:has(.pml-detail),
.pm-app:has(.pmf) {
    background: #ffffff;
}

.pml {
    padding: 14px 16px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── 히어로 그라데이션 — 결제 대기 KPI + 생성 CTA ── */
.pml-hero {
    position: relative;
    overflow: hidden;
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: linear-gradient(160deg, #0f9d6e 0%, #0a7d57 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 157, 110, .22);
}

.pml-hero__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.pml-hero__orb--a {
    top: -34px;
    right: -34px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, .08);
}

.pml-hero__orb--b {
    bottom: -56px;
    left: -22px;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, .05);
}

.pml-hero__label {
    position: relative;
    font-size: clamp(.78rem, 3.3vw, .9rem);
    opacity: .88;
}

.pml-hero__amount {
    position: relative;
    margin-top: 4px;
    font-size: clamp(1.7rem, 7.4vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;
}

.pml-hero__amount em {
    margin-left: 4px;
    font-size: clamp(.85rem, 3.6vw, 1rem);
    font-weight: 500;
    font-style: normal;
    opacity: .9;
    letter-spacing: 0;
}

.pml-hero__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: clamp(.86rem, 3.5vw, .96rem);
    font-weight: 600;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .15s;
}

.pml-hero__cta:active {
    background: rgba(255, 255, 255, .32);
}

.pml-hero__cta i {
    font-size: 18px;
}

/* ── 세그먼트(상태) 칩 — 가로 스크롤 ── */
.pml-seg {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -16px;
    padding: 2px 16px;
}

.pml-seg::-webkit-scrollbar {
    display: none;
}

.pml-seg__chip {
    flex: none;
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid var(--pm-line);
    background: #ffffff;
    color: var(--pm-sub);
    font-size: clamp(.78rem, 3.2vw, .88rem);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s, color .15s, border-color .15s;
}

.pml-seg__chip b {
    font-weight: 700;
    opacity: .75;
}

.pml-seg__chip.is-on {
    background: #1f2933;
    border-color: #1f2933;
    color: #ffffff;
}

.pml-seg__chip.is-on b {
    opacity: 1;
}

/* ── 링크 카드 리스트 ── */
.pml-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pml-item {
    list-style: none;
}

.pml-more {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--pm-muted);
    font-size: clamp(.78rem, 3.2vw, .88rem);
    font-weight: 700;
}

.pml-more[hidden] {
    display: none;
}

.pml-more__spin {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e8ec;
    border-top-color: var(--pm-green);
    border-radius: 50%;
    animation: pmlSpin .75s linear infinite;
}

@keyframes pmlSpin {
    to {
        transform: rotate(360deg);
    }
}

.pml-card {
    display: block;
    position: relative;
    padding: 13px 14px 13px 16px;
    border-radius: 14px;
    border: 0.5px solid #eef0f3;
    border-left: 5px solid #cbd2dc;
    background: #ffffff;
    color: var(--pm-text);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    transition: transform .12s, background .15s, box-shadow .15s;
}

.pml-card:active {
    transform: scale(.985);
    background: #f7f8fa;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

/* ── 상태별 좌측 띠 — 카드를 한눈에 구분 ── */
.pml-item[data-status="shared"] > .pml-card {
    border-left-color: #2a8be0;
}

.pml-item[data-status="paid"] > .pml-card {
    border-left-color: var(--pm-green);
}

.pml-item[data-status="expired"] > .pml-card {
    border-left-color: #9aa4b2;
    background: #fafbfc;
}

.pml-item[data-status="cancelled"] > .pml-card {
    border-left-color: var(--pm-danger);
    background: #fffafa;
}

.pml-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

/* 좌상단 날짜 묶음 — 만료일(yyyy-mm-dd) + D-day 위아래 */
.pml-card__date {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.pml-card__expire {
    font-size: clamp(.7rem, 2.9vw, .8rem);
    font-weight: 500;
    color: var(--pm-muted);
    letter-spacing: -.1px;
    line-height: 1.25;
    font-feature-settings: 'tnum';
}

.pml-card__dday {
    font-size: clamp(.82rem, 3.5vw, .94rem);
    font-weight: 700;
    letter-spacing: -.2px;
    line-height: 1.2;
    font-feature-settings: 'tnum';
    color: var(--pm-text);
}

.pml-card__title {
    font-size: clamp(.92rem, 3.8vw, 1.02rem);
    font-weight: 600;
    color: var(--pm-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pml-card__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
}

.pml-card__buyer {
    font-size: clamp(.72rem, 3vw, .82rem);
    color: var(--pm-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.pml-card__amount {
    font-size: clamp(1.02rem, 4.4vw, 1.18rem);
    font-weight: 700;
    letter-spacing: -.3px;
    color: var(--pm-text);
    white-space: nowrap;
    flex: none;
}

/* ── 상태 뱃지 — 카드 좌상단 (또렷한 가독성) ── */
.pml-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: clamp(.7rem, 2.9vw, .8rem);
    font-weight: 700;
    letter-spacing: -.1px;
}

.pml-badge--shared {
    color: #1167b8;
    background: #e4f0fc;
}

.pml-badge--paid {
    color: var(--pm-green-d);
    background: var(--pm-soft);
}

.pml-badge--expired {
    color: #6b7787;
    background: #eef1f4;
}

.pml-badge--cancelled,
.pml-badge--refunded {
    color: var(--pm-danger);
    background: #fdeced;
}

/* ── 상태별 톤 — D-day(좌상단) + buyer(하단) 같은 색으로 통일 ── */
.pml-item[data-status="shared"] .pml-card__dday,
.pml-item[data-status="shared"] .pml-card__buyer {
    color: #e24b4a;
}

.pml-item[data-status="paid"] .pml-card__dday,
.pml-item[data-status="paid"] .pml-card__buyer {
    color: var(--pm-green);
}

.pml-item[data-status="expired"] .pml-card__dday,
.pml-item[data-status="expired"] .pml-card__buyer {
    color: #9aa4b2;
}

.pml-item[data-status="cancelled"] .pml-card__dday,
.pml-item[data-status="cancelled"] .pml-card__buyer {
    color: var(--pm-danger);
}

/* ── 빈 상태 ── */
.pm-empty-box {
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pm-empty-box__ic {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--pm-soft);
    color: var(--pm-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.pm-empty-box p {
    font-size: clamp(.88rem, 3.6vw, 1rem);
    color: var(--pm-sub);
}

/* ── 검색 아이콘(헤더) — 적용 중일 때 페이그린 도트 ── */
.pml-search-btn {
    position: relative;
}

.pml-search-btn.is-on::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pm-green);
    border: 2px solid #ffffff;
}

/* ── 검색 시트 폼 — 기간·이름·전화번호 입력 ── */
.pml-input {
    width: 100%;
    height: 49px;
    padding: 0 14px;
    border: 1px solid var(--pm-line);
    border-radius: 12px;
    color: var(--pm-text);
    background: #ffffff;
    font-family: inherit;
    font-size: clamp(.95rem, 4vw, 1.05rem);
}

.pml-input:focus {
    outline: none;
    border-color: var(--pm-green);
}

.pml-dates {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pml-dates input[type="date"] {
    flex: 1;
    min-width: 0;
    height: 49px;
    padding: 0 12px;
    border: 1px solid var(--pm-line);
    border-radius: 12px;
    color: var(--pm-text);
    background: #ffffff;
    font-family: inherit;
    font-size: clamp(.9rem, 3.6vw, 1rem);
}

.pml-dates input[type="date"]:focus {
    outline: none;
    border-color: var(--pm-green);
}

.pml-dates span {
    color: var(--pm-muted);
    font-size: 14px;
    flex: none;
}

/* 라벨 우측 보조문구 */
.pm-ff__label small {
    margin-left: 6px;
    color: var(--pm-muted);
    font-weight: 500;
    font-size: clamp(.7rem, 2.9vw, .8rem);
}

/* ════════════════════════════════════════════════════════
   링크결제 상세 — pml-detail
   흰 배경 · 상태별 컬러 박스 · 큰 금액 · 정보 라인 · 하단 고정 액션
   ════════════════════════════════════════════════════════ */

.pml-detail {
    padding: 0 0 96px;
    background: #ffffff;
}

/* ── 상단 상태 박스 ── */
.pml-detail__status {
    padding: 14px 16px 0;
}

.pml-detail__status-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
}

.pml-detail__status-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pml-detail__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
}

.pml-detail__status-name {
    font-size: clamp(.86rem, 3.5vw, .96rem);
    font-weight: 800;
    letter-spacing: -.1px;
}

.pml-detail__status-right {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.pml-detail__status-cap {
    font-size: clamp(.72rem, 3vw, .82rem);
    color: var(--pm-sub);
}

.pml-detail__status-strong {
    font-size: clamp(1.05rem, 4.4vw, 1.18rem);
    font-weight: 800;
    letter-spacing: -.3px;
    font-feature-settings: 'tnum';
}

.pml-detail__status-strong--md {
    font-size: clamp(.84rem, 3.4vw, .94rem);
    font-weight: 700;
}

/* 상태별 컬러 (박스 배경 + 텍스트 + 도트) */
.pml-detail[data-status="shared"] .pml-detail__status-box {
    background: #eaf3ff;
}
.pml-detail[data-status="shared"] .pml-detail__status-name { color: #1167b8; }
.pml-detail[data-status="shared"] .pml-detail__status-dot { background: #2a8be0; }
.pml-detail[data-status="shared"] .pml-detail__status-strong { color: #e24b4a; }

.pml-detail[data-status="paid"] .pml-detail__status-box {
    background: var(--pm-soft);
}
.pml-detail[data-status="paid"] .pml-detail__status-name { color: var(--pm-green-d); }
.pml-detail[data-status="paid"] .pml-detail__status-dot { background: var(--pm-green); }
.pml-detail[data-status="paid"] .pml-detail__status-strong { color: var(--pm-green); }

.pml-detail[data-status="expired"] .pml-detail__status-box {
    background: #eef1f4;
}
.pml-detail[data-status="expired"] .pml-detail__status-name { color: #6b7787; }
.pml-detail[data-status="expired"] .pml-detail__status-dot { background: #9aa4b2; }
.pml-detail[data-status="expired"] .pml-detail__status-strong { color: #9aa4b2; }

.pml-detail[data-status="cancelled"] .pml-detail__status-box {
    background: #fdeced;
}
.pml-detail[data-status="cancelled"] .pml-detail__status-name { color: var(--pm-danger); }
.pml-detail[data-status="cancelled"] .pml-detail__status-dot { background: var(--pm-danger); }
.pml-detail[data-status="cancelled"] .pml-detail__status-strong { color: var(--pm-danger); }

/* ── 히어로 (금액 + 상품명) ── */
.pml-detail__hero {
    padding: 24px 20px 18px;
    text-align: center;
}

.pml-detail__hero-cap {
    font-size: clamp(.74rem, 3vw, .82rem);
    color: var(--pm-muted);
    margin-bottom: 6px;
}

.pml-detail__hero-amount {
    font-size: clamp(1.85rem, 8.5vw, 2.2rem);
    font-weight: 800;
    color: var(--pm-text);
    letter-spacing: -1.4px;
    line-height: 1.05;
    font-feature-settings: 'tnum';
}

.pml-detail__hero-amount em {
    margin-left: 3px;
    font-size: clamp(.95rem, 3.8vw, 1.05rem);
    font-weight: 500;
    color: var(--pm-sub);
    font-style: normal;
    letter-spacing: 0;
}

.pml-detail__hero-goods {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    background: #f7f8fa;
    border-radius: 10px;
    font-size: clamp(.86rem, 3.5vw, .96rem);
    font-weight: 600;
    color: var(--pm-text);
}

/* ── 점선 구분 ── */
.pml-detail__dash {
    margin: 0 18px;
    border-top: 1px dashed #e6e9ed;
}

/* ── 정보 섹션 (구매자 정보 / 링크 정보 / 결제 정보) ── */
.pml-detail__sec {
    padding: 16px 20px 6px;
}

.pml-detail__sec + .pml-detail__sec {
    padding-top: 6px;
    padding-bottom: 14px;
}

.pml-detail__sec-title {
    font-size: clamp(.72rem, 2.9vw, .8rem);
    font-weight: 600;
    color: var(--pm-muted);
    margin-bottom: 6px;
    letter-spacing: .2px;
}

.pml-detail__row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    font-size: clamp(.85rem, 3.5vw, .95rem);
}

.pml-detail__row span {
    color: var(--pm-sub);
}

.pml-detail__row b {
    color: var(--pm-text);
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

/* ── 하단 고정 액션 (상태별 가변) ── */
.pml-detail-fixed {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 20;
    width: 100%;
    max-width: 500px;
    display: grid;
    grid-template-columns: .36fr 1fr;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #f3f5f8;
    transform: translateX(-50%);
}

.pml-detail-fixed:has(.pml-detail-fixed__sub--wide:only-child),
.pml-detail-fixed:has(.pml-detail-fixed__main--wide:only-child) {
    grid-template-columns: 1fr;
}

.pml-detail-fixed__sub,
.pml-detail-fixed__main {
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: clamp(.95rem, 4vw, 1.05rem);
    font-weight: 800;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.pml-detail-fixed__sub {
    color: var(--pm-sub);
    background: #ffffff;
    border: 1px solid var(--pm-line);
}

.pml-detail-fixed__sub--wide {
    color: var(--pm-text);
}

.pml-detail-fixed__sub i,
.pml-detail-fixed__main i {
    font-size: 17px;
}

.pml-detail-fixed__main {
    color: #ffffff;
    background: var(--pm-green);
    box-shadow: 0 8px 18px rgba(15, 157, 110, .22);
}

.pml-detail-fixed__main:active {
    background: var(--pm-green-d);
}

/* ════════════════════════════════════════════════════════
   링크결제 등록/수정 폼 — pmf (등록 + 수정 통합)
   금액 카드(탭 유도) · 폼 입력 · 키패드 시트(결제 화면 톤)
   ════════════════════════════════════════════════════════ */

.pmf {
    padding: 16px;
    padding-bottom: 96px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #ffffff;
}

/* ── 수정 모드 상단 상태 칩 ── */
.pmf-state {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #eaf3ff;
}

.pmf-state__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2a8be0;
    flex: none;
}

.pmf-state__name {
    font-size: clamp(.78rem, 3.2vw, .88rem);
    font-weight: 800;
    color: #1167b8;
}

.pmf-state__hint {
    margin-left: auto;
    font-size: clamp(.7rem, 2.9vw, .8rem);
    color: var(--pm-sub);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pmf-state__hint i {
    font-size: 13px;
}

/* 상태별 색상 (배경/텍스트/도트) — list/detail 톤과 일관 */
.pmf[data-status="paid"] .pmf-state {
    background: var(--pm-soft);
}
.pmf[data-status="paid"] .pmf-state__name { color: var(--pm-green-d); }
.pmf[data-status="paid"] .pmf-state__dot { background: var(--pm-green); }

.pmf[data-status="expired"] .pmf-state {
    background: #eef1f4;
}
.pmf[data-status="expired"] .pmf-state__name { color: #6b7787; }
.pmf[data-status="expired"] .pmf-state__dot { background: #9aa4b2; }

.pmf[data-status="cancelled"] .pmf-state {
    background: #fdeced;
}
.pmf[data-status="cancelled"] .pmf-state__name { color: var(--pm-danger); }
.pmf[data-status="cancelled"] .pmf-state__dot { background: var(--pm-danger); }

/* ── 금액 카드 — 탭해서 키패드 호출 ── */
.pmf-amount {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 14px;
    background: var(--pm-soft);
    color: var(--pm-text);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: transform .12s, background .15s;
}

.pmf-amount:active {
    transform: scale(.99);
    background: #d6efe2;
}

.pmf-amount__cap {
    font-size: clamp(.74rem, 3vw, .84rem);
    font-weight: 700;
    color: var(--pm-green-d);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pmf-amount__cap .req {
    color: var(--pm-danger);
    font-weight: 700;
}

.pmf-amount__val {
    display: flex;
    align-items: baseline;
    gap: 5px;
    justify-content: flex-end;
    margin-top: 4px;
}

.pmf-amount__val b {
    font-size: clamp(1.7rem, 7.6vw, 2.1rem);
    font-weight: 800;
    color: var(--pm-text);
    letter-spacing: -1.2px;
    font-feature-settings: 'tnum';
    line-height: 1.05;
}

.pmf-amount__val em {
    font-size: clamp(.86rem, 3.5vw, .96rem);
    font-weight: 500;
    color: var(--pm-sub);
    font-style: normal;
}

.pmf-amount__hint {
    font-size: clamp(.7rem, 2.9vw, .8rem);
    color: var(--pm-green-d);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.pmf-amount__hint i {
    font-size: 13px;
}

.pmf-amount.is-locked {
    background: #f7f8fa;
    cursor: default;
}

.pmf-amount.is-locked:active {
    transform: none;
    background: #f7f8fa;
}

.pmf-amount.is-locked .pmf-amount__cap {
    color: var(--pm-sub);
}

.pmf-amount.is-locked .pmf-amount__cap i {
    font-size: 13px;
}

.pmf-amount.is-locked .pmf-amount__val b {
    color: var(--pm-sub);
}

/* ── 일반 폼 필드 ── */
.pmf-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pmf-label {
    font-size: clamp(.74rem, 3vw, .84rem);
    font-weight: 700;
    color: var(--pm-sub);
    display: flex;
    align-items: center;
    gap: 5px;
}

.pmf-label .req {
    color: var(--pm-danger);
    font-weight: 700;
}

.pmf-label small {
    margin-left: auto;
    font-size: clamp(.66rem, 2.7vw, .76rem);
    color: var(--pm-muted);
    font-weight: 500;
}

.pmf-label i {
    font-size: 13px;
    color: var(--pm-muted);
}

.pmf-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--pm-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--pm-text);
    font-family: inherit;
    font-size: clamp(.92rem, 3.8vw, 1rem);
}

.pmf-input:focus {
    outline: none;
    border-color: var(--pm-green);
}

.pmf-input.is-locked {
    background: #f7f8fa;
    color: var(--pm-sub);
    cursor: default;
}

.pmf-input--gap {
    margin-top: 8px;
}

.pmf-input--ta {
    height: auto;
    min-height: 88px;
    padding: 12px 14px;
    resize: none;
    line-height: 1.5;
}

/* 날짜 + 시간 가로 배치 */
.pmf-date {
    display: flex;
    gap: 6px;
}

.pmf-date .pmf-input {
    flex: 1;
    min-width: 0;
}

.pmf-input--time {
    flex: none;
    width: 84px;
    text-align: center;
}

/* 만료 빠른 선택 칩 */
.pmf-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pmf-quick button {
    height: 30px;
    padding: 0 11px;
    border: 1px solid var(--pm-line);
    border-radius: 15px;
    background: #ffffff;
    color: var(--pm-sub);
    font-size: clamp(.72rem, 3vw, .82rem);
    font-weight: 700;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}

.pmf-quick button:active {
    background: var(--pm-soft);
    border-color: var(--pm-green);
    color: var(--pm-green);
}

/* ── 하단 고정 액션 ── */
.pmf-foot {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 20;
    width: 100%;
    max-width: 500px;
    display: grid;
    grid-template-columns: .36fr 1fr;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #f3f5f8;
    transform: translateX(-50%);
}

.pmf-foot__sub,
.pmf-foot__main {
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: clamp(.95rem, 4vw, 1.05rem);
    font-weight: 800;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.pmf-foot__sub {
    background: #ffffff;
    color: var(--pm-sub);
    border: 1px solid var(--pm-line);
}

.pmf-foot__sub--del {
    color: var(--pm-danger);
    border-color: #fbd5d5;
}

.pmf-foot__sub i,
.pmf-foot__main i {
    font-size: 17px;
}

.pmf-foot__main {
    background: var(--pm-green);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 157, 110, .22);
}

.pmf-foot__main:active {
    background: var(--pm-green-d);
}

/* ════════════════════════════════════════════════════════
   키패드 시트 — 결제 화면(.pm-keypad / .pm-pay-adds) 톤 그대로
   ════════════════════════════════════════════════════════ */

.pmf-sheet {
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear .28s;
}

.pmf-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
    transition: visibility 0s linear;
}

.pmf-sheet__dim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    opacity: 0;
    transition: opacity .25s ease;
}

.pmf-sheet.is-open .pmf-sheet__dim {
    opacity: 1;
}

.pmf-sheet__panel {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    transform: translate(-50%, 100%);
    background: #ffffff;
    border-radius: 22px 22px 0 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .12);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.pmf-sheet.is-open .pmf-sheet__panel {
    transform: translate(-50%, 0);
}

.pmf-sheet__bar {
    width: 38px;
    height: 4px;
    background: var(--pm-line);
    border-radius: 2px;
    margin: 0 auto;
    flex: none;
}

.pmf-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pmf-sheet__head strong {
    font-size: clamp(.95rem, 3.8vw, 1.05rem);
    font-weight: 800;
    color: var(--pm-text);
}

.pmf-sheet__x {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--pm-sub);
    font-size: 20px;
    cursor: pointer;
}

/* 큰 금액 표시 */
.pmf-sheet__amount {
    text-align: center;
    padding: 18px 6px 6px;
}

.pmf-sheet__amount strong {
    display: block;
    width: 100%;
    font-size: clamp(2rem, 9vw, 2.6rem);
    line-height: 1.05;
    font-weight: 900;
    color: #000000;
    letter-spacing: -1px;
    font-feature-settings: 'tnum';
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.pmf-sheet__amount span {
    display: block;
    margin-top: 8px;
    color: #b7bbc1;
    font-size: clamp(.8rem, 3.2vw, .92rem);
}

/* 빠른 추가 4개 그리드 — 결제 화면 톤 */
.pmf-adds {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pmf-adds button {
    min-height: 40px;
    border-radius: 11px;
    background: #fafafa;
    border: 1px solid #f1f2f4;
    color: var(--pm-green);
    font-size: clamp(.78rem, 3.1vw, .92rem);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 9px rgba(20, 25, 30, .04);
    transition: transform .08s;
}

.pmf-adds button:active {
    transform: scale(.97);
}

/* 숫자 키패드 3x4 — 결제 화면(.pm-keypad) 톤 */
.pmf-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 2.6vh, 22px) 10px;
    padding: 4px 8px 0;
}

.pmf-keypad button {
    height: clamp(44px, 7.8vh, 64px);
    border: 0;
    background: transparent;
    color: #43484e;
    font-size: clamp(1.45rem, 5.8vw, 1.95rem);
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: transform .08s;
}

.pmf-keypad button:active {
    transform: scale(.97);
}

.pmf-keypad i {
    font-size: clamp(1.55rem, 6.6vw, 2.1rem);
}

/* 시트 하단 [완료] */
.pmf-sheet__done {
    margin-top: 4px;
    height: 50px;
    border-radius: 14px;
    border: 0;
    background: var(--pm-green);
    color: #ffffff;
    font-size: clamp(.95rem, 4vw, 1.05rem);
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 8px 18px rgba(15, 157, 110, .22);
}

.pmf-sheet__done:active {
    background: var(--pm-green-d);
}

.pmf-sheet__done i {
    font-size: 17px;
}

/* ── 작은 화면 ── */
@media (max-width: 374px) {
    .pml {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pml-seg {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .pml-detail__status {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pml-detail__hero,
    .pml-detail__sec {
        padding-left: 16px;
        padding-right: 16px;
    }

    .pml-detail-fixed,
    .pmf-foot {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pmf {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pmf-sheet__panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pmf-keypad {
        padding-left: 4px;
        padding-right: 4px;
        gap: 8px 6px;
    }
}

/* 작은 높이 대응 — 결제 화면 키패드 패턴 그대로 */
@media (max-height: 720px) {
    .pmf-sheet__amount {
        padding-top: 12px;
        padding-bottom: 4px;
    }

    .pmf-keypad {
        gap: 8px 8px;
    }

    .pmf-keypad button {
        height: 44px;
    }
}
