@media (max-width:1024px){
    .send_popup.grid2 {grid-template-columns:repeat(1,1fr);}
    .message_sample a.btn.btn_color.btn_h40.male-auto {white-space: nowrap}
    .message_sample input[type="search"] {width: 100%;}
    #hq > section:has(.overnight_main){min-width: unset; padding: 0 }
    #hq > section:has(.overnight_list){min-width: unset; padding: 0 }
    #hq > .overnight_setup{min-width: unset; padding: 0 }
    .grid_v4.overnight_main{padding: 0 }
    .grid_v4:has(.overnight_list){padding: 0 }
    .overnight_main{grid-template-columns:1fr;}
    section:has(.overnight_main) nav.panel{justify-content: center}
    .overnight_summary .grid3{grid-template-columns:repeat(1,1fr);}
    .overnight_setting{margin-top:20px;}
    .overnight_month .table.month{overflow-x:auto;}
    .overnight_month .table.month table{min-width:900px;}
    .overnight_list{width:100%;}

    .overnight_setting{margin-top:20px;}
    .grid.grid_v4:has(.overnight_list){grid-template-columns:1fr;}
    .overnight_list .panel{flex-wrap:wrap;}
    .overnight_list .panel select,
    .overnight_list .panel input,
    .overnight_list .panel .btn{flex:1 1 auto;}
    .overnight_list .table{overflow-x:auto;}
    .overnight_list .table table{min-width:1200px;}
    section:has(.overnight_list) nav.panel{justify-content: center}

    div:has(.overnight_setup) nav.panel{gap:10px;flex-wrap:wrap;justify-content: center}
    .overnight_setup .btn_h40{height:44px}
    .overnight_setup .box_gray label{font-size:14px}
    .overnight_setup .box_gray>div.flex{flex-direction: row;align-items: stretch;flex-wrap: nowrap;}
    .overnight_setup input.white{width:100%}
    .overnight_setup input[type=time].w50{width:calc(50% - 10px)}
    .overnight_setup .select label{width:50%}
    .overnight_setup .male-auto{margin-left:0}
}
@media (max-width:640px){
    .box_today {padding: 20px}
    .right_patient .box_gray3 .tagbox > div:nth-child(odd) {
        width: 100% !important;
    }
    #hq:has(.overnight_main) > section > .flex {flex-wrap: wrap;flex-direction: column-reverse}
    #hq:has(.overnight_list) > section > .flex {flex-wrap: wrap;flex-direction: column-reverse}
    #hq:has(.overnight_setup) > section > .flex {flex-wrap: wrap;flex-direction: column-reverse}
    .overnight_main{grid-template-columns:1fr;gap:15px;padding:0 10px;}
    .overnight_summary .grid3{grid-template-columns:1fr;}
    .overnight_summary .grid3 ul{max-height:none;}
    .overnight_setting{margin-top:15px;}
    .overnight_month .table.month{overflow-x:auto;}
    .overnight_month .table.month table{min-width:700px;}

    .grid.grid_v4:has(.overnight_list){grid-template-columns:1fr;gap:15px;padding:0 10px;}
    .overnight_list .panel{flex-wrap: wrap}
    .overnight_list .panel .male-auto{margin-left:0;display:flex;gap:5px;}
    .overnight_list .table{overflow-x:auto;}
    .overnight_list .table table{min-width:1100px;}
    .overnight_setting{margin-top:15px;}

    .overnight_setup .flex.ai-c.gap15.mb25{flex-direction:column;align-items:stretch}
    .overnight_setup .btn{width:100%}
    .overnight_setup .box_gray{padding:15px}
    .overnight_setup .box_gray>label{margin-top:15px}
    .overnight_setup .box_gray>div.flex{flex-direction: row;align-items: stretch;flex-wrap: nowrap;}
    .overnight_setup input.white,
    .overnight_setup input[type=number]{height:46px;font-size:16px}
    .overnight_setup input[type=time]{width:100%;height:46px}
    .overnight_setup .select{flex-direction:column}
    .overnight_setup .select label{width:100%;text-align:center}
    .overnight_setup .box_gray2{font-size:13px;line-height:1.5}
}
