/* 모바일 입력 필드 넘침 문제 완전 해결 */

/* 모바일 전용 스타일 */
@media (max-width: 768px) {
    /* 모든 입력 필드 강제 조정 */
    .tw-input-base,
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="url"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        -webkit-box-sizing: border-box !important;
        -moz-box-sizing: border-box !important;
        margin: 0 !important;
        padding: 10px 12px !important;
        font-size: 16px !important;
        -webkit-appearance: none !important;
        border-radius: 4px !important;
    }
    
    /* 컨테이너 너비 조정 */
    .container,
    .card,
    .card-body,
    form,
    .space-y-3,
    .space-y-4,
    .grid,
    .grid > div {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* grid 레이아웃 모바일 최적화 */
    .grid {
        display: block !important;
    }
    
    .grid > div {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    /* 폼 그룹 여백 조정 */
    .space-y-3 > div,
    .space-y-4 > div {
        margin-bottom: 15px !important;
    }
    
    /* 라벨 스타일 */
    label {
        display: block !important;
        margin-bottom: 5px !important;
        font-size: 14px !important;
    }
    
    /* 버튼 모바일 최적화 */
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px !important;
        font-size: 16px !important;
        padding: 10px 20px !important;
    }
    
    /* 전체 페이지 넘침 방지 */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    /* 메인 컨텐츠 영역 */
    main,
    section,
    article {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

/* 아주 작은 화면 (400px 이하) */
@media (max-width: 400px) {
    .container,
    .card-body,
    form {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    input,
    textarea,
    select {
        font-size: 16px !important; /* iOS 자동 줌 방지 */
    }
}