:root {
    --primary: #0f4c81;
    --primary-hover: #0a365c;
    --primary-light: #f0f5fa;
    --primary-border: #cfe0f0;
    
    --success: #1b6a4a;
    --success-bg: #f2f8f5;
    --success-border: #bfe0d0;
    --success-badge: #d7ede1;
    
    --danger: #b91c1c;
    --danger-bg: #fdf3f3;
    --danger-border: #f8c9c9;
    --danger-badge: #fad9d9;
    
    --warning: #a15c07;
    --warning-bg: #fdfaf2;
    --warning-border: #f5e4bd;
    --warning-badge: #faeccd;
    
    --bg-page: #f6f8fb;
    --bg-card: #ffffff;
    --bg-section: #fbfcfd;
    --border-default: #e2e8f0;
    --border-focus: #0f4c81;
    --text-title: #0f172a;
    --text-body: #2d3748;
    --text-muted: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Segoe UI", sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    padding: 44px 16px;
    display: flex;
    justify-content: center;
    letter-spacing: -0.3px;
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

/* 유틸리티 및 분리된 인라인 클래스들 */
.hidden { display: none !important; }
.label-inline { margin-bottom: 0; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.btn-link { color: var(--primary); text-decoration: underline; cursor: pointer; }
.text-success-bold { color: var(--success); font-weight: 700; }
.modal-list { padding-left: 18px; line-height: 1.7; color: var(--text-body); }

.container {
    max-width: 680px;
    width: 100%;
    background: var(--bg-card);
    padding: 40px 32px;
    border-radius: 18px;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04), 0 16px 24px -4px rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-default);
}

.header { margin-bottom: 30px; }
.service-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 11px;
    border-radius: 16px;
    margin-bottom: 10px;
    border: 1px solid var(--primary-border);
}
.header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-title);
    line-height: 1.4;
}
.header p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.5;
}

.card-section {
    background: var(--bg-section);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card-section:focus-within {
    border-color: var(--primary-border);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.04);
}

.card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title-left { display: flex; align-items: center; }
.card-title-right { font-size: 12px; font-weight: 600; }
.step-num { color: var(--primary); font-weight: 800; margin-right: 6px; }
.req { color: var(--danger); margin-left: 2px; }

.form-group { margin-bottom: 16px; position: relative; width: 100%; }
.form-group:last-child { margin-bottom: 0; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-body); }

select, input[type="text"], input[type="number"] {
    width: 100%; height: 48px; padding: 0 14px;
    border: 1px solid var(--border-default); border-radius: 8px;
    font-size: 14px; background: #ffffff; color: var(--text-title);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
input[type="text"], input[type="number"] { background-image: none; }

select:focus, input:focus {
    outline: none; border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

input:disabled, select:disabled {
    background-color: #f1f5f9; color: #8391a3;
    cursor: not-allowed; border-color: var(--border-default);
}

.desc-text { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.45; }

.check-group { display: flex; flex-direction: column; gap: 12px; }
.check-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; cursor: pointer; color: var(--text-body); }
.check-item input { margin-top: 3px; width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

.instant-pass {
    background-color: var(--success-bg); border: 1px solid var(--success-border); color: var(--success);
    padding: 13px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; margin-top: 10px; display: none; line-height: 1.55;
}

.autocomplete-box {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #ffffff;
    border: 1px solid var(--border-default); border-radius: 8px; max-height: 200px; overflow-y: auto; z-index: 50;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
}
.autocomplete-item { padding: 10px 14px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background-color: var(--primary-light); color: var(--primary); font-weight: 600; }

.result-box { margin-top: 24px; padding: 22px 24px; border-radius: 12px; line-height: 1.65; transition: all 0.2s ease; }
.result-box.pass { background: var(--success-bg); border: 1px solid var(--success-border); }
.result-box.verify { background: var(--warning-bg); border: 1px solid var(--warning-border); }
.result-box.fail { background: var(--danger-bg); border: 1px solid var(--danger-border); }

.status-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
    border-radius: 6px; font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.status-badge::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.pass .status-badge { background: var(--success-badge); color: var(--success); }
.pass .status-badge::before { background: var(--success); }
.verify .status-badge { background: var(--warning-badge); color: var(--warning); }
.verify .status-badge::before { background: var(--warning); }
.fail .status-badge { background: var(--danger-badge); color: var(--danger); }
.fail .status-badge::before { background: var(--danger); }

.result-title { font-size: 17.5px; font-weight: 800; margin-bottom: 8px; color: var(--text-title); }
.result-content { font-size: 13.5px; white-space: pre-line; color: var(--text-body); }
.result-verify-guide {
    margin-top: 14px; padding: 14px 16px; background: #ffffff; border-radius: 8px;
    border: 1px solid var(--warning-border); font-size: 12.5px; color: var(--warning); line-height: 1.55;
}

.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); z-index: 1000;
    justify-content: center; align-items: center;
}
.modal-content {
    background: #ffffff; max-width: 540px; width: 90%; max-height: 80vh; overflow-y: auto;
    padding: 28px; border-radius: 14px; font-size: 13px; line-height: 1.65;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1);
}
.modal-header { font-size: 16px; font-weight: 800; margin-bottom: 14px; color: var(--text-title); }
.modal-close {
    background: var(--primary); color: #fff; border: none; padding: 10px 18px;
    border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; float: right; margin-top: 16px;
}
.modal-close:hover { background: #0c3c66; }

@media (max-width: 480px) {
    body { padding: 20px 10px; }
    .container { padding: 24px 18px; border-radius: 14px; }
    .header h1 { font-size: 19px; }
    .card-section { padding: 16px 14px; }
}