:root {
    color-scheme: light dark;
    --color-1: light-dark(#2C3947, #E8EDF2);
    --color-2: light-dark(#547A95, #C2A56D);
    --color-3: light-dark(#C2A56D, #547A95);
    --color-4: light-dark(#E8EDF2, #2C3947);
}

html {
    padding: 0;
    margin: 0;
}

body {
    padding: 0;
    margin: 0;
    background: var(--color-4);
    color: var(--color-1);
    font-family: "Noto Sans JP", sans-serif;
    font-optical-sizing: auto;
}

h1 {
    font-family: "Noto Serif Hentaigana", serif;
    font-size: inherit;
    font-weight: normal;
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 48;
    cursor: pointer;
    font-size: inherit;
}

a, a:visited {
    text-decoration: none;
    color: inherit;
}

header, footer {
    position: sticky;
    width: 100%;
    background: color-mix(in srgb, transparent 50%, var(--color-4) 50%);
}

header {top: 0}
footer {bottom: 1em}

.flex-around {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sitename, #menu  {
    width: calc(100% / 3);
    text-align: center;
}

#menu  {
    width: calc(100% / 3);
    text-align: right;
}

#undo, #progress, #next {
    width: 50%;
    text-align: center;
}

#close {
    width: 100%;
    text-align: right;
    display: inline-block;
    position: sticky;
    top: 0;
}

#menu, #undo, #progress, #next, #close {
    font-size: 50px;
}

header {
    color: var(--color-2);
}

aside {
    text-align: center;
    color: var(--color-2);
    /* opacity: 50%; */
}

#progress.celebrate {
    animation: slide 400ms ease-out;
}

@keyframes slide {
    0% {margin-left: 50%}
    100% {margin-left: 0%}
}

#progress.celebrate + #next {
    animation: enter 400ms ease-out;
}

@keyframes enter {
    0% {width: 0%}
    100% {width: 50%}
}

#sidebar {
    width: 3in;
    height: 100%;
    overflow-y: auto;
    position: fixed;
    top: 0;
    right: -3in;
    background: var(--color-4);
    text-align: center;
    transition: right 300ms, box-shadow 300ms;
}

#sidebar.open {
    right: 0;
    box-shadow: 15px 0 30px var(--color-1);
}

#sidebar > p, #sidebar > a, #sidebar > em, #sidebar > div > p {
    display: block;
    width: calc(100% - 2em);
    padding: 1em;
    margin: 0;
}

.puzzle-listing .number {
    font-weight: bold;
}

.puzzle-listing .date {
    color: var(--color-2);
}

.current {
    font-weight: bold;
    background: color-mix(in srgb, transparent 84%, var(--color-1));
}

#tutorial, #about {
    animation: appear 400ms;
}

@keyframes appear {
    0% {
        height: 0;
        overflow: hidden;
    }

    100% {
        height: 100%;
    }
}

#app.loading #puzzlesvg, #app.loading footer {opacity: 0}
#puzzlesvg, footer {transition: opacity 3s}

.unread {position: relative}
.unread:before {
    content: "•";
    font-size: inherit;
    color: red;
    position: absolute;
    line-height: 0;
    top: .25ch;
    left: -.6ch;
}