/* 양육비 추심 0원 결제하기 (신청서) */
.ap { background: var(--cream); min-height: 70vh; padding: 28px 0 64px; }
.ap-wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

.ap-form, .ap-done { background: #fff; border: 1px solid #ece7da; border-radius: 20px; padding: 30px 28px 32px; box-shadow: 0 10px 40px rgba(90, 70, 20, .07); }
.ap-head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.ap-head h1 { font-size: clamp(23px, 5.4vw, 30px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.3; }
.ap-head p { margin-top: 6px; font-size: 15px; color: var(--ink-soft); }
.ap-head strong { color: var(--orange-dark); }

.ap-field { margin-bottom: 22px; }
.ap-field > label, .ap-label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1.45; }
.ap-req { color: var(--danger); }
.ap-help { margin: -2px 0 10px !important; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.ap-field input[type="text"], .ap-field input[type="tel"], .ap-field textarea {
    width: 100%; padding: 14px 16px; border: 1px solid #cfcabd; border-radius: 12px; background: #fff;
    font: inherit; font-size: 16px; line-height: 1.5; color: var(--ink); letter-spacing: -0.01em; transition: border-color .15s, box-shadow .15s;
}
.ap-field input[type="text"], .ap-field input[type="tel"] { height: 54px; }
.ap-field textarea { resize: vertical; min-height: 130px; }
.ap-field input::placeholder, .ap-field textarea::placeholder { color: #a8a396; }
.ap-field input:focus, .ap-field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 21, 21, .1); }
.ap-field [aria-invalid="true"] { border-color: var(--danger); }

.ap-upload {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 10px 16px;
    border: 1.5px dashed #b9b3a3; border-radius: 12px; background: #fbf9f3; color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.ap-upload:hover { border-color: var(--ink); background: #f6f2e7; }
.ap-upload.is-busy { opacity: .7; pointer-events: none; }
.ap-upload input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.ap-upload:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }

.ap-files { margin: 0 0 10px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ap-files li { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; font-size: 14.5px; background: #fff; }
.ap-files li + li { border-top: 1px solid var(--line); }
.ap-files__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-files__name::before { content: '✓'; margin-right: 8px; color: #1a8f4a; font-weight: 700; }
.ap-files__size { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.ap-files button { flex: 0 0 auto; min-height: 34px; padding: 0 12px; border: 1px solid #d9d4c7; border-radius: 8px; background: #fff; color: var(--ink-soft); font-size: 13.5px; cursor: pointer; }
.ap-files button:hover { border-color: var(--danger); color: var(--danger); }

.ap-agree { margin: 28px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
.ap-check { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; font-size: 15.5px; line-height: 1.55; cursor: pointer; }
.ap-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.ap-check a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ap-agree .ap-err { margin: -4px 0 6px 34px !important; }

.ap-err { margin: 7px 0 0 !important; font-size: 14px; color: var(--danger); }
.ap-err--form { margin: 16px 0 0 !important; padding: 12px 14px; border-radius: 10px; background: #fef3f2; }
.ap-turnstile { margin-top: 18px; min-height: 65px; }
.ap-submit { margin-top: 22px; min-height: 64px; font-size: 20px; }
.ap-foot { margin-top: 12px !important; text-align: center; font-size: 13.5px; color: var(--muted); }

.ap-done { text-align: center; padding-top: 40px; }
.ap-done__icon { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; background: var(--yellow); color: var(--ink); }
.ap-done h1 { margin-top: 18px; font-size: clamp(22px, 5.2vw, 28px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.35; }
.ap-done > p { margin-top: 10px; color: var(--ink-soft); }
.ap-done ul { margin: 22px 0 0; padding: 18px 20px; list-style: none; border-radius: 14px; background: var(--cream); text-align: left; font-size: 15px; line-height: 1.6; }
.ap-done li { position: relative; padding-left: 16px; }
.ap-done li + li { margin-top: 6px; }
.ap-done li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.ap-done__actions { display: flex; gap: 10px; margin-top: 24px; }
.ap-done__actions .mp-btn { flex: 1 1 0; padding: 0 12px; font-size: 16.5px; }
.ap-done__tel { margin-top: 18px !important; font-size: 14.5px; }
.ap-done__tel a { font-weight: 700; }

.ap-dialog { width: min(760px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); overflow: hidden; }
.ap-dialog[open] { display: flex; flex-direction: column; }
.ap-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.ap-dialog__head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 22px; border-bottom: 1px solid var(--line); font-size: 17px; }
.ap-dialog__head button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.ap-dialog__head button:hover { background: #f2f0ea; color: var(--ink); }
.ap-dialog__body { flex: 1 1 auto; overflow-y: auto; padding: 18px 22px 24px; -webkit-overflow-scrolling: touch; }
.ap-dialog__body.mp-doc { font-size: 15px; line-height: 1.75; max-width: none; }
.ap-dialog__foot { flex: 0 0 auto; padding: 12px 16px; border-top: 1px solid var(--line); text-align: right; }
.ap-dialog__foot .mp-btn { min-height: 46px; font-size: 16px; }

@media (max-width: 520px) {
    .ap { padding: 14px 0 44px; }
    .ap-wrap { padding: 0 10px; }
    .ap-form, .ap-done { padding: 22px 16px 24px; border-radius: 16px; }
    .ap-done__actions { flex-direction: column; }
    .ap-done__actions .mp-btn { flex: 0 0 auto; }
    .ap-dialog__body { padding: 16px 16px 20px; }
}
