.q-and-a-slider .out {
    position: relative;
}
.q-and-a-slider .in img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: .5s;
    z-index: 0;
}
.q-and-a-slider img {
    display: block;
    width: 100%;
    height: auto;
}
.q-and-a-slider input {
    display: none;
}
.q-and-a-slider .in {
    display: flex;
    justify-content: center;
}
.q-and-a-slider label span {
    display: block;
    width: 25px;
    height: 25px;
    padding: 7px;
    margin: 15px 0 0;
    border-radius: 100%;
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.q-and-a-slider label span::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: #c0c0c0;
    opacity: 0.5;
    border-radius: 100%;
}
input:nth-of-type(1):checked ~ .in label:nth-of-type(1) span::before,
input:nth-of-type(2):checked ~ .in label:nth-of-type(2) span::before,
input:nth-of-type(3):checked ~ .in label:nth-of-type(3) span::before,
input:nth-of-type(4):checked ~ .in label:nth-of-type(4) span::before,
input:nth-of-type(5):checked ~ .in label:nth-of-type(5) span::before {
    background: #000;
    opacity: 1;
}
.q-and-a-slider label span::before {
    animation: slidebutton 17.5s infinite;
}
@keyframes slidebutton{
    0%{opacity: 0.5;background: #c0c0c0;}
    2.85%{opacity: 1;background: #000;}/* b÷x×100=y */
    20%{opacity: 1;background: #000;}/* 100÷c=z */
    22.85%{opacity: 0.5;background: #c0c0c0;}/* y+z */
}
.q-and-a-slider label:nth-of-type(2) span::before,
.q-and-a-slider label:nth-of-type(2) img {
    animation-delay: 3.5s;
}
.q-and-a-slider label:nth-of-type(3) span::before,
.q-and-a-slider label:nth-of-type(3) img {
    animation-delay: 7s;
}
.q-and-a-slider label:nth-of-type(4) span::before,
.q-and-a-slider label:nth-of-type(4) img {
    animation-delay: 10.5s;
}
.q-and-a-slider label:nth-of-type(5) span::before,
.q-and-a-slider label:nth-of-type(5) img {
    animation-delay: 14s;
}
input:nth-of-type(1):checked ~ .in label:nth-of-type(1) img,
input:nth-of-type(2):checked ~ .in label:nth-of-type(2) img,
input:nth-of-type(3):checked ~ .in label:nth-of-type(3) img,
input:nth-of-type(4):checked ~ .in label:nth-of-type(4) img,
input:nth-of-type(5):checked ~ .in label:nth-of-type(5) img {
    opacity: 1;
    z-index: 1;
}
.q-and-a-slider .in img {
    animation: slide 17.5s infinite;/* (a+b)×c=x */
    opacity: 0;
}
@keyframes slide{
    0%{opacity: 0;}
    2.85%{opacity: 1;z-index: 1;}/* b÷x×100=y */
    20%{opacity: 1;}/* 100÷c=z */
    22.85%{opacity: 0;z-index: 0;}/* y+z */
}
input:checked ~ .in img,
input:checked ~ .in span::before {
    animation: none;
}
.q-and-a-slider .in:hover img,
.q-and-a-slider .in:hover span::before {
    animation-play-state:paused;/* マウスを載せると一時停止 */
}