body{
    color: #222;
    box-sizing:border-box;
    line-height: 25px;    
    font-family: "Noto Sans JP", sans-serif;
    font-size: 17px;
    margin:0;
    padding:0;
    min-height: 100vh;
}

body.drow_active{
    overflow: hidden;
}



input[type="file"] {
    display: none;
}

p{
    margin:0;
}

ul, ol{
    padding: 0px;    
}
hr{
    margin: 10px 0;
    border-top: #ccc 1px solid;
}

ol{
    counter-reset: item;
    list-style-type: none;
    padding-left: 0;
  }
li{
padding: 1.3em 0 1.3em 2.3em;
border-top: 1px solid #aaa;
font-size: 16px;
}

li:last-child{
    border-bottom: 1px solid #aaa;
}
li:before {
background-color: #087;
border-radius: 30px;
counter-increment: item;
content: counter(item);
padding: 0 6px;
margin-right:-1.5em;
color: #fff;
position: relative;
left: -32px;
}


#header{
    max-width: 960px;
    margin:auto;
    padding: 2px 30px;
    text-align: right;
    /* background-color: #115963; */
    /* background-color: #ffc; */
    display: flex;
    justify-content: space-between;

}
#header a{
    color: #333;
}
#main_header{
    margin-top: 10px;
    margin-bottom: 10px;
    color:#2c3e50;
    font-weight: 700;
    text-align: center;
    font-size: 26px;
    letter-spacing: -0.5px;
}
#title{
    width:90%;
    max-width: 800px;
    margin: 0 auto 8px auto;
    text-align: center;
}
.subtitle{
    color: #5a6c7d;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}
#header a{
    font-size: 14px;
    text-decoration: none;
}


#content{
    width: 100%;
    margin:0;
    
}
#content_2{
    margin: 0 auto;
    max-width: 900px;
    padding: 0 30px 15px 30px;
}

.section-card{
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

.section-title{
    font-size: 17px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
}

#content_3{
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.setting-item{
    flex: 1;
    min-width: 250px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.setting-label{
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 15px;
}

.time-input-wrapper{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#input_time{
    width: 80px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    padding: 6px 8px 6px 14px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    color: #2c3e50;
    background: #fff;
}

#input_time:focus{
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.time-unit{
    font-size: 16px;
    font-weight: 600;
    color: #5a6c7d;
}

.checkbox-group{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group-horizontal{
    flex-direction: row;
    gap: 12px;
    justify-content: center;
}

.checkbox-label{
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #2c3e50;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-label:hover{
    background: rgba(102, 126, 234, 0.05);
}

.checkbox-label input[type="checkbox"]{
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

#file_control_row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    width: 100%;
    position: relative;
}

#file_count{
    width: 30%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: auto;
    font-size: 14px;
    color: #5a6c7d;
    text-align: center;
    display: inline-block;
}

#clear_btn{
    width: 30%;
    margin-left: auto;
    background-color: #6c757d;
    text-align: center;
    color: #fff;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

#clear_btn:hover{
    background-color: #5a6268;
    transform: translateY(-1px);
}


#content_4{
    margin: 20px 0 0 0;
    padding-top: 10px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.info-card{
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-card h2{
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.info-card p{
    color: #5a6c7d;
    line-height: 1.7;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.step-list{
    margin: 0;
    padding-left: 0;
    list-style: none;
    counter-reset: step-counter;
}

.step-list li{
    counter-increment: step-counter;
    margin-bottom: 15px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    position: relative;
    padding-left: 55px;
}

.step-list li::before{
    content: counter(step-counter);
    position: absolute;
    left: 15px;
    top: 15px;
    width: 26px;
    height: 26px;
    min-width: 26px;
    max-width: 26px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.step-list li strong{
    color: #2c3e50;
    font-size: 15px;
    display: block;
    margin-bottom: 6px;
}

.step-list li{
    color: #5a6c7d;
    line-height: 1.6;
    font-size: 13px;
}

#input_label{
    display: inline-block;
    padding: 10px 22px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#input_label:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}
#input_pictures{
    margin-top:10px;
}
.file-count-number{
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
}
#timer_start{
    
    display: flex;
    justify-content: space-between;

}
#timer_start_btn{
    width: 280px;
    height: 46px;
    font-size: 19px;
    font-weight: 700;
    margin: 10px auto;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
    transition: all 0.3s ease;
    display: block;
}

#timer_start_btn:hover{
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.5);
}

#timer_start_btn:active{
    transform: translateY(-1px);
}

#picture_get_area{
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-sizing:border-box;
    padding: 14px 12px;
    width: 100%;
    text-align: center;
    border: 3px dashed #cbd5e0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#picture_get_area:hover{
    border-color: #4a90e2;
    background: linear-gradient(135deg, #f0f7ff 0%, #e1f0ff 100%);
}

#picture_get_area.ddefect{
    border-color: #4a90e2;
    background: linear-gradient(135deg, #e1f0ff 0%, #cce5ff 100%);
}

.upload-icon{
    font-size: 32px;
    margin-bottom: 8px;
}

.upload-text{
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 2px 0;
}

.upload-subtext{
    font-size: 12px;
    color: #6c757d;
    margin: 0 0 8px 0;
}
#pictuire_count{
    font-weight: bold;
}
#drow_window{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
}

#picture_image{
    height: calc(100vh - 45px);
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5vw;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
}

#picture_image img{
    margin: 0 auto;
    display: block;
    object-fit: contain;
    width: calc(100vw - 3vw);
    height: calc(100vh - 45px - 3vw);
    max-width: calc(100vw - 3vw);
    max-height: calc(100vh - 45px - 3vw);
    box-sizing: border-box;
    border-radius: 7px;
    clip-path: inset(0 round 7px);
    cursor: pointer;
}

#picture_overlay_icon{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#picture_overlay_icon.show{
    display: flex;
    opacity: 1;
    animation: fadeInOut 1.5s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

#picture_overlay_icon.play_icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 60%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border: 20px solid transparent;
    border-left: 30px solid rgba(0, 0, 0, 0.8);
}

#picture_overlay_icon.pause_icon::before,
#picture_overlay_icon.pause_icon::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.8);
    top: 50%;
    transform: translateY(-50%);
}

#picture_overlay_icon.pause_icon::before {
    left: calc(50% - 10px);
}

#picture_overlay_icon.pause_icon::after {
    left: calc(50% + 4px);
}

#timer_view{
    position: fixed;
    height: 40px;
    width: 100%;
    /* bottom:45px; */
}

#time_meter{
    width:100%;
    height: 5px;
    background: #666;
    transition: none;
    transition-timing-function: linear;
    position: relative;
}

#time_meter::after{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--meter-width, 100%);
    background: #fa0;
    transition: width 0.05s linear;
}

#drow_menu_base{
    background-color: rgba(0,0,0,0.6);
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}
#drow_menu{
    width:93%;
    height:100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin:10px auto auto auto;
    color:#fff;
    gap: 10px;
    position: relative;
}

#play {
    text-align: center;
    display: flex;
    position: relative;
    width:100px;
    height: 35px;
    color: #fff;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}
#play::before {
    position: absolute;
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%);
    width: 0px;
    height: 0px;
    border: 13px solid transparent;
    border-left: 23px solid currentColor;
    box-sizing: border-box;
    content: "";
}
#pause {
    display: flex;
    position: relative;
    width: 57px;
    height: 35px;
    color: #fff;
    margin: 0 auto;
    text-align: center;
    align-items: center;
    justify-content: center;
}
#pause::before,
#pause::after {
    position: absolute;
    top: 50%;
    width: 4px;
    height: 23px;
    box-sizing: border-box;
    background-color: currentColor;
    content: "";
    transform: translateY(-50%);
}
#pause::before {
    left: calc(50% - 8px);
}
#pause::after {
    left: calc(50% + 4px);
}
#timer_end_btn{
    width:100px;
    height: 35px;
    margin-left: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border-radius: 4px;
    color: #fff;
    font-size: 24px;
    position: relative;
    z-index: 1001;
    margin-bottom: 5px;
}
#timer_end_btn:hover{
    background-color: rgba(255,255,255,0.3);
}
#timer_stop_btn,#timer_restart_btn{
    width:100px;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border-radius: 4px;
    position: relative;
    z-index: 1001;
    margin-bottom: 5px;
}
#timer_stop_btn:hover,#timer_restart_btn:hover{
    background-color: rgba(255,255,255,0.3);
}
#prev_btn,#next_btn{
    width:50px;
    height: 35px;
    cursor: pointer;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s;
    border-radius: 4px;
    position: relative;
    z-index: 1001;
    margin-bottom: 5px;
}
#prev_icon,#next_icon{
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}
#prev_btn:hover,#next_btn:hover{
    background-color: rgba(255,255,255,0.3);
}
#time_count_view{
    color: #fff;
    font-size: 34px;
    text-align: center;
    width:100px;
    flex-shrink: 0;
    margin: 0 10px 5px 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    pointer-events: none;
}
#end{
    position: relative;
    display: block;
    top: 4px;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
 }
 #end::before {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 0.4em;
    height: 0.4em;
    transform: translateY(-0%) rotate(-135deg);
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    content: "";
 }
 #end::after{
    position: absolute;
    top: 17px;
    right: 10px;
    width: 0.4em;
    height: 0.4em;
    transform: translateY(-0%) rotate(-135deg);
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    content: "";

 }

.main-wrapper{
    padding: 0px;
    width: 100%;
    height: auto;
    margin:0;
}
footer{
    margin:50px 0;
}

@media screen and (max-width: 770px){         
    
    #content_2{
        padding: 0 20px;
    }
    
    #content_3{
        flex-direction: column;
        gap: 20px;
    }
    
    .setting-item{
        min-width: 100%;
    }
    
    #content_4{
        flex-direction: column;
        gap: 20px;
    }
    
    .info-card{
        min-width: 100%;
    }
    
    .section-card{
        padding: 20px;
    }
    
    #main_header{
        font-size: 24px;
    }
    
    .subtitle{
        font-size: 14px;
    }
    
    /* モバイル・タブレット用の画像余白調整 */
    #picture_image{
        padding: 0.8vw;
    }
    
    #picture_image img{
        max-width: calc(100vw - 1.6vw);
        max-height: calc(100vh - 45px - 1.6vw);
    }

    #timer_stop_btn,#timer_restart_btn{
        width:70px;
    }
    #play{
        width:70px;
    }
    
    #prev_btn,#next_btn{
        width:30px;
    }
}
#img_random{
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* タブレットサイズ用 */
@media screen and (min-width: 771px) and (max-width: 1024px){
   
    #picture_image img{
        max-width: calc(100vw - 2.4vw);
        max-height: calc(100vh - 45px - 2.4vw);
    }
}