:root {
    --white: #fcf6f4;
    --pink: #AC324B;

    --tonedpink: #944756;
}

* {
    padding: 0;
    scrollbar-color: var(--pink) var(--white);
}

*::-webkit-scrollbar-track {
    background: var(--white);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--pink);
}

.skip-to-content {
    position: absolute;
    transform: translateY(-100%);
    opacity: 0;
}

.skip-to-content:focus {
    transform: translateY(0%);
    opacity: 1;
}

.strikethrough {
    text-decoration: underline var(--pink) .08em;
    text-underline-offset: -.25em;
    text-decoration-skip-ink: none;
}

hr {
    color: var(--pink);
    margin: 0.5em;
    border-top: double var(--pink);
}

body {
    min-height: 100vh;

    background: #f7e7e2 url(/image-files/backgrounds/bg3.png);
    background-attachment: fixed;
    color: var(--pink);
    font-family: MS PGothic;
}

header {
    background: var(--pink);
    color: var(--white);

    min-height: 3em;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer {
    background: var(--pink);
    color: var(--white);
    
    margin-top: 3vh;

    min-height: 3em;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

main {
    display: flex;
    gap: 20px;
    margin: 3vh 2vw 0 2vw;
    width: 1300px;
    margin: 2em auto 0 auto;
}

.leftside {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#navigation-box {
    max-height: 30em;
    min-height: 23em;
    min-width: 288px;
}

#nav-content {
    max-height: 33em;
    overflow: hidden scroll;
    padding: 0.6lh 2ch 0lh 2ch;
    margin-bottom: 0.5lh;
    display: flex;
    flex-direction: column;
    gap: 1lh;
}

li::marker {
    content: "♡︎ ";
}

ol li::marker {
    content: initial;
}

summary:focus {
    background-color: var(--pink);
    color: var(--white)
}

a {
    position: relative;
    color: #881f34;
    transition: color .3s ease-in-out;
    z-index: 0;
    &:after {
        content: "";
        display: block;
        position: absolute;
        inset: 0;
        width: 0;
        background-color: #881f34;
        transition: width .3s ease-in-out;
        z-index: -1;
    }
    &:hover, &:focus {
        color: white;
    }
    &:hover:after, &:focus:after {
        width: 100%;
    }
}

#left-width {
    min-width: 280px;
    max-width: 280px;
}

.yumeoi-name {
    writing-mode: vertical-rl;
    margin-top: 0.8em;
    font: 1.2em MS PGothic;
}

.letter {
    text-combine-upright: all;
}

.empty-sec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 55px;
    width: 230px;
}

#favs {
    background-color: var(--white);
    padding: 5px;
    text-align: center;
}

.animate-remove {
    transition: initial;
    &:after {
        background-color: initial;
        transition: initial;
    }
    &:hover {
        color: initial;
    }
}

#panels {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

ul {
    margin-left: 1em;
}

.header { 
    display: flex;
    justify-content: space-between;
}

.header span {
    background: linear-gradient(180deg,rgba(252, 246, 244, 0) 0%, rgba(252, 246, 244, 1) 50%);
    margin-left: 3ch;
    position: relative;
    bottom: 2px;
}

#content { 
    padding: 0.6lh 2ch 1lh 2ch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1lh;
    max-height: 15lh;
    overflow-y: scroll;
    margin: auto 0.34em 0.55lh 0.34em;
    text-align: center;
}

.img-borders {
    border: 6px double var(--pink);
}

/* quiz table styling */

table, tr, td {
    border: 1px solid black;
}

table {
    text-align: center;
    background-color: #6495ED;
    width: 12em;
}

table p {
    margin: 1em;
}

#content-me {
    display: flex;
    flex-wrap: wrap;
    padding: 0.6lh 2ch 1lh 2ch;
    justify-content: center;
    max-height: 15lh;
    overflow-y: scroll;
    margin: auto 0.34em 0.55lh 0.34em;
}

.me-gallery {
    display: flex;
    flex-direction: initial;
    flex-wrap: wrap;
    padding: 0.6lh 2ch 1lh 2ch;
    justify-content: center;
    gap: 1lh;
}

.arisa, .mary, .ramuda, .yamato, .sakuya {
    position: relative;
    text-align: center;
    transition: transform 0.5s;
}

.mary:hover, .yamato:hover {
    transform: scale(1.05) rotate(-2deg);
}

.arisa:hover, .ramuda:hover, .sakuya:hover {
    transform: scale(1.05) rotate(2deg);
}

#arisa, #mary, #ramuda, #yamato, #sakuya {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s;
    opacity: 0;
}

#arisa:hover, #mary:hover, #ramuda:hover, #yamato:hover, #sakuya:hover {
    opacity: 1;
}

.me-gallery a {
    transition: initial;
    &:after {
        background-color: initial;
        transition: initial;
        z-index: -1;
    }
}

#s-m-t-tooltip {
    z-index: 938458935;
    background: var(--white);
    color: var(--pink);
    font-size: 1em;
    line-height: 140%;
    text-align: center;
    border: 2px solid var(--pink);
    max-width: 7rem;
    word-wrap: normal;
    padding: 5px;
    display: block;
    margin: 1.4em;
}

a.fn {
    color: black;
    vertical-align: super;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8em;
}

a.fn:hover {
    color: var(--white);
}

.footnotes ol {
    padding: 0px;
    counter-reset: footnote-counter;
}

.footnotes li {
    margin-bottom: 0.5em;
}

.footnotes a {
    color: black;
    font-weight: bold;
    text-decoration: none;
}

.footnotes a:hover {
    color: var(--white);
}

.brokenlink a {
    transition: initial;

    &::after {
        transition: initial;
        background-color: initial;
    }
    &:hover, &:focus {
        color: white;
    }
    &:hover:after, &:focus:after {
        width: 100%;
    }
}

@media only screen and (max-width: 1200px) {

    main {
        flex-direction: column;
        justify-content: initial;
        width: initial;
        margin: 2em 10px 0 10px;
    }

    .leftside {
        display: flex;
        flex-direction: initial;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    #navigation-box {
        max-height: 25em;
        min-height: 25em;
        min-width: 288px;
    }

    #nav-content {
        max-height: 23em;
        overflow: hidden scroll;
        text-align: center;
        align-items: center;
    }

    li {
        list-style-position: outside;
    }

    .yumeoi-name {
        writing-mode: initial;
        text-align: center;
        margin-top: initial;
    }

    .letter {
        text-combine-upright: none;
    }

    .empty-sec {
        align-self: center;
        gap: 15px;
    }
    
    #content {
        max-height: 18lh;
    }

}

@media (prefers-reduced-motion: reduce) {
    a {
        transition: initial;
    }

    .arisa, .mary, .ramuda, .yamato, .sakuya {
        transition: initial;
    }
    
    .mary:hover, .yamato:hover {
        transform: initial;
    }
    
    .arisa:hover, .ramuda:hover, .sakuya:hover {
        transform: initial;
    }
    
    #arisa, #mary, #ramuda, #yamato, #sakuya {
        transition: initial;
        opacity: initial;
    }
    
    #arisa:hover, #mary:hover, #ramuda:hover, #yamato:hover, #sakuya:hover {
        opacity: initial;
    }
}

@media (prefers-color-scheme: dark) {

    * {
        padding: 0;
        scrollbar-color: var(--white) var(--tonedpink);
    }

    *::-webkit-scrollbar-track {
        background: var(--tonedpink);
    }

    *::-webkit-scrollbar-thumb {
        background-color: var(--white);
    }

    .strikethrough {
        text-decoration: underline var(--white) .08em;
    }

    hr {
        color: var(--white);
        border-top: double var(--white);
    }

    body {
        background: #66313c url(/image-files/backgrounds/bg3.png);
        color: var(--white);
    }

    header {
        background: var(--white);
        color: var(--tonedpink);
    }

    footer {
        background: var(--white);
        color: var(--tonedpink);
    }

    summary:focus {
        background-color: var(--white);
        color: var(--tonedpink)
    }

    a {
        position: relative;
        color: #fcf6f4;
        transition: color .3s ease-in-out;
        z-index: 0;
        &:after {
            content: "";
            display: block;
            position: absolute;
            inset: 0;
            width: 0;
            background-color: #fcf6f4;
            transition: width .3s ease-in-out;
            z-index: -1;
        }
        &:hover, &:focus {
            color: var(--tonedpink);
        }
        &:hover:after, &:focus:after {
            width: 100%;
        }
    }

    #favs {
        background-color: var(--tonedpink);
    }

    .header span {
        background: linear-gradient(180deg,rgba(148, 71, 86, 0) 0%, rgba(148, 71, 86, 1) 50%);
    }

    .img-borders {
        border: 6px double var(--white);
    }

    /* quiz table styling */

    table, tr, td {
        border: 1px solid black;
    }

    table {
        text-align: center;
        background-color: #6495ED;
        width: 12em;
    }

    #s-m-t-tooltip {
        background: var(--tonedpink);
        color: var(--white);
        border: 2px solid var(--white);
    }

    a.fn {
        color: white;
    }

    a.fn:hover {
        color: var(--tonedpink);
    }

    .footnotes a {
        color: white;
    }

    .footnotes a:hover {
        color: var(--tonedpink);
    }

}