body {
    margin: 0;
}

header form {
    display: block;
    position: relative;
    width: max-content;
    margin: 20px auto;
    border: solid 2px gray;
    border-radius: 8px;
    padding: 2px;
    box-sizing: border-box;
}

header h1 {
    text-align: center;
    font-family: "Shippori Mincho B1", serif;
}

form input {
    font-size: 16.5px;
    padding: 5px 10px;
    border: none;
    background-color: white;
    width: 250px;
}

form button {
    border: none;
    background-color: white;
    color: black;
    font-size: 18px;
}

#searchResult {
    display: block;
    position: relative;
}

#searchResult img {
    display: inline-block;
    max-width: calc(100% - 10px);
    max-height: 400px;
    margin: 5px;
    box-shadow: 1px 1px 5px #000000a6;
}

img[data-view-start] {
    box-shadow: 1px 1px 5px #000000dd !important;
}

.afterinsert {
    display: inline-block;
    position: relative;
}

.afterinsert::after {
    content: 'ad';
    display: inline-block;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 12px;
    font-weight: bold;
    background-color: tomato;
    color: white;
    padding: 2px 6px;
    box-sizing: border-box;
    box-shadow: 1px 1px 2px black;
}

.afterinsert img {
    height: 400px;
}

.hidden {
    display: none !important;
}

#imagePopup {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 100dvw;
    height: 100dvh;
    background-color: #0008;
    backdrop-filter: blur(2px);
    z-index: 10;
}

#imagePopup #img {
    display: block;
    position: relative;
    margin-right: auto;
    margin-left: auto;
    margin-top: 5dvh;
    margin-bottom: 5dvh;
    width: 100%;
    height: 90dvh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

#loadMore {
    display: block;
    position: relative;
    margin: 10px auto 30px auto;
    width: max-content;
    background-color: #000000;
    color: white;
    transition: all 220ms 0ms ease;
    padding: 0.5rem 2rem;
    font-size: 1.3rem;
}

#loadMore:hover {
    background-color: #6c6c6c;
}

footer {
    display: block;
    width: 100%;
    background-color: #6c6c6c;
    color: white;
    padding: 1rem;
    box-sizing: border-box;
    font-size: 14px;
}

footer a {
    color: white;
    display: block;
}

@media screen and (max-width: 600px) {
    #searchResult>img {
        max-height: none;
    }
}