@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

body {
    background-color: #f1f5f9;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.page-container {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 24px 20px;
    text-align: center;
}

.header h1 {
    font-size: 26px; /* 20px * 1.3 */
    font-weight: 700;
    letter-spacing: -0.5px;
}

.content {
    padding: 28px 24px;
    flex-grow: 1;
}

.content h2 {
    font-size: 23px; /* 18px * 1.3 */
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f172a;
    border-left: 5px solid #3b82f6;
    padding-left: 12px;
}

.listview {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.listview li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    font-size: 21px; /* 16px * 1.3 */
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.listview li::after {
    content: '→';
    font-weight: 700;
    color: #3b82f6;
    transition: transform 0.2s ease;
}

.listview li:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
}

.listview li:hover::after {
    transform: translateX(4px);
}

/* Forms & Controls */
.form-group {
    margin-bottom: 24px;
}

.form-group label.input-label {
    display: block;
    font-size: 18px; /* 14px * 1.3 */
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 16px 18px;
    font-size: 21px; /* 16px * 1.3 */
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input[type="text"]:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* Custom Choice Card (Checkboxes & Radios) */
.field-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 24px;
    border: none;
    padding: 0;
}

.field-container legend {
    font-size: 18px; /* 14px * 1.3 */
    font-weight: 700;
    color: #64748b;
    margin-bottom: 14px;
    display: block;
}

.choice-card {
    display: flex;
    align-items: center;
    position: relative;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 22px;
    font-size: 21px; /* 16px * 1.3 */
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.choice-card input[type="checkbox"],
.choice-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.choice-card .checkbox-icon,
.choice-card .radio-icon {
    width: 28px; /* 22px * 1.3 */
    height: 28px; /* 22px * 1.3 */
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #ffffff;
    position: relative;
}

.choice-card .radio-icon {
    border-radius: 50%;
}

/* Checked States */
.choice-card input:checked + .checkbox-icon {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.choice-card input:checked + .checkbox-icon::after {
    content: '✓';
    color: #ffffff;
    font-weight: 700;
    font-size: 18px; /* 14px * 1.3 */
}

.choice-card input:checked + .radio-icon {
    border-color: #3b82f6;
}

.choice-card input:checked + .radio-icon::after {
    content: '';
    width: 13px; /* 10px * 1.3 */
    height: 13px; /* 10px * 1.3 */
    background-color: #3b82f6;
    border-radius: 50%;
    display: block;
}

.choice-card:has(input:checked) {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 600;
}

.choice-card:active {
    transform: scale(0.98);
}

.limitcount {
    font-size: 16px; /* 12px * 1.3 */
    font-weight: 500;
    display: block;
    margin-top: 6px;
}

/* Buttons */
.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 21px; /* 16px * 1.3 */
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.btn-submit:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.btn-submit:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* Footer */
.footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 18px 20px;
    text-align: center;
}

.footer h1 {
    font-size: 14px; /* 11px * 1.3 */
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Result / Alert Styles */
.alert-card {
    padding: 24px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
}

.alert-card.success {
    background-color: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    color: #065f46;
}

.alert-card.error {
    background-color: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
}

.alert-card h3 {
    font-size: 26px; /* 20px * 1.3 */
    font-weight: 700;
    margin-bottom: 12px;
}

.alert-card p,
.alert-card font,
.alert-card div {
    font-size: 21px; /* 16px * 1.3 */
    line-height: 1.6;
}

.btn-secondary {
    display: inline-block;
    width: 100%;
    padding: 16px;
    font-size: 20px; /* 15px * 1.3 */
    font-weight: 700;
    text-align: center;
    color: #475569;
    background-color: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #334155;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* 작은 화면 또는 세로 해상도가 낮은 모바일 기기 대응 (한 화면에 다 들어가도록 조절) */
@media (max-width: 360px), (max-height: 700px) {
    body {
        padding: 8px;
    }
    
    .page-container {
        border-radius: 12px;
    }

    .header {
        padding: 16px 12px;
    }
    
    .header h1 {
        font-size: 20px;
    }

    .content {
        padding: 16px 18px;
    }

    .content h2 {
        font-size: 18px;
        margin-bottom: 12px;
        border-left-width: 4px;
        padding-left: 8px;
    }

    .listview {
        gap: 8px;
    }

    .listview li {
        padding: 14px 16px;
        font-size: 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label.input-label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .form-group input[type="text"] {
        padding: 12px 14px;
        font-size: 16px;
    }

    .field-container {
        gap: 8px;
        margin-top: 8px;
        margin-bottom: 16px;
    }

    .field-container legend {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .choice-card {
        padding: 12px 16px;
        font-size: 16px;
    }

    .choice-card .checkbox-icon,
    .choice-card .radio-icon {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .choice-card input:checked + .checkbox-icon::after {
        font-size: 13px;
    }

    .choice-card input:checked + .radio-icon::after {
        width: 8px;
        height: 8px;
    }

    .limitcount {
        font-size: 12px;
        margin-top: 4px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 16px;
    }

    .footer {
        padding: 12px 16px;
    }

    .footer h1 {
        font-size: 11px;
    }

    .alert-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .alert-card h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .alert-card p,
    .alert-card font,
    .alert-card div {
        font-size: 14px;
    }

    .btn-secondary {
        padding: 12px;
        font-size: 15px;
    }
}
