body.no-scroll {
    overflow: hidden;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    position: relative; /* 閉じるボタンの基準位置 */
}


.wastes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
}

.wastes li {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 10px;
    background-color: #FFF;
    transition: background-color 0.2s;
}

.wastes li:hover {
    background-color: #eee;
    text-decoration: none;
}

.wastes li img {
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto 5px auto;
}

.wastes li span {
    padding-top: 5px;
    align-items: center;
    justify-content: center;
    display: flex;
}

.wasteModal2col {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.modal-icon {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.wasteModal2col-text {
    flex: 1;
}

.modal-navigation {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-navigation button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background-color: #FFF;
    border: 1px solid #ccc;
    cursor: pointer;
    min-height: 30px;
    border-radius: 6px;
}

.modal-navigation button:hover {
    background-color: #ddd;
}

.modal-navigation button img {
    width: 50px;
    height: 50px;
}

#prevWaste::before,
#nextWaste::after {
    content: '';
    border: solid black;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
}

#prevWaste::before {
    transform: rotate(135deg);
    order: -1;
}

#nextWaste::after {
    transform: rotate(-45deg);
}

.pagination-status {
    font-size: 0.9em;
    color: #555;
}


/* 見出し調整 */
div.wasteModal2col-text h2#toc-heading-0.waste-name {
    margin: 0 0 1rem;
    padding: 18px 18px 21px;
    font-size: 1.75rem;
}

section#honbun-sub div.container h2 {
    padding: 14px 12px 19px;
    margin: 1.5em -5px 0.5em -5px;
    font-size: 1.688rem;
}

#modalWasteCategory {
    font-weight: bold;
}



@media (max-width: 768px) {
    .modal {
        padding-top: 0px;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .wasteModal2col {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0px;
    }

    #modalWasteCategory {
        font-size: 0.9rem;
    }

    #modalWasteDescription {
        text-align: left;
    }

    section#honbun-sub div.container h2 {
        padding: 14px 35px 14px 34px;
        margin: 1.5em -35px 0.5em -34px;
        display: flex;
        justify-content: center;
        text-align: left;
        font-size: 1.2rem;
    }

    .wastes {
        grid-template-columns: repeat(2, 1fr);
        font-size: 0.85rem;
    }
}


/* The Close Button ('x') */
button.close-button {
	position: absolute;
    top: -15px;
    right: -15px;
	width: 36px;
	height: 36px;
	background-color: #333;
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	border: 2px solid white;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	text-decoration: none;
	z-index: 1002;
	padding: 0px;
	margin: 0;
}

button.close-button:hover {
    background-color: #555;
}

/* The 'x' mark using pseudo-elements */
button.close-button::before,
button.close-button::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 2px;
    background-color: #fff;
}

button.close-button::before {
    transform: rotate(45deg);
}

button.close-button::after {
    transform: rotate(-45deg);
}