* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scrollbar-gutter: stable;
}


body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

header h1,
header h2 {
    margin-bottom: 0.2rem;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-title {
    position: absolute;
    /* bottom: 0; */
    /* left: 50%; */
    right: 10px;
    transform: translate(10%, -30%);
    background: var(--main-bg);
    /* padding: 0 0.5rem; */
    font-weight: 900;
    font-size: 1rem;
    rotate: calc(40deg);
}

nav ol {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

nav ol,
nav li {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
nav,
main,
footer,
.commentbox,
#disqus_thread {
    width: 90%;
    max-width: 42rem;
    padding: 1rem;
}

main {
    line-height: 1.6rem;
}

main img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
    max-width: 100%;
}

main video {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#latest_posts {
    list-style-type: none;
    font-size: 1.2rem;
    padding: 0;
}

pre {
    overflow: scroll;
}

#pagination {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.pagectrl {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pagenext {
    margin-left: auto;
}

.pageprev {
    margin-right: 1rem;
}

.pagectrl p {
    margin: 0;
}

footer {
    font-size: 0.8rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

footer p,
footer address,
footer aside {
    margin: 0;
    margin-inline: 0;
    margin: 0.1rem;
}

footer address {
    font-style: normal;
}

footer aside {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.lastupdate::after {
    content: " • ";
}

iframe {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.tagList {
    list-style-type: none;
    padding: 0.25rem;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tagList a {
    font-size: 1.5rem;
}

.tagList li {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tagged {
    margin-top: 3rem;
}

.tagged h2 {
    font-size: 2rem;
}

img[src*='berrysprite.png'] {
    float: right;
    padding-right: 1rem;
}

/* GIF pause toggle - pure CSS */
.gif-toggle {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.gif-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: calc(100% - 1.5rem);
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.gif-toggle .gif-animated,
.gif-toggle .gif-still {
    display: block;
    max-width: 100%;
}

.gif-toggle .gif-still {
    display: none;
}

.gif-toggle input[type="checkbox"]:checked ~ .gif-animated {
    display: none;
}

.gif-toggle input[type="checkbox"]:checked ~ .gif-still {
    display: block;
}

.gif-toggle::after {
    /* content: "▶ Playing"; */
    content: "Animation: On";
    order: -1;
    font-weight: bold;
    background: white;
    color: var(--main-link-color);
    color: black;
    border: 1px solid black;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    cursor: pointer;
}

.gif-toggle:has(input:checked)::after {
    /* color: var(--hover-link-color); */
    content: "Animation: Off";
    text-decoration: line-through;
}