#material fieldset,
#material fieldset button,
#material ul,
#material ul li,
#symbols #old ul li {
    margin: 0;
}

article section b {
    margin-right: 0.5rem;
}

article section p {
    margin: 1rem 0 2rem;
}

#symbols #old ul {
    margin: 2rem 0;
}

#symbols #old {
    margin: 4rem 0;
}

#material fieldset,
#material ul,
#symbols details {
    padding: 0;
}

#material ul li u,
dialog#tag #close {
    padding: 0 0.5rem;
}

article section h2 ruby rt {
    padding: 0.5rem 0;
}

#material ul li button,
#material fieldset button,
#material fieldset nav,
#symbols details summary {
    padding: 1rem;
}

#symbols details[open] summary {
    padding: 1rem 1rem 0.5rem;
}

article section h2,
article section p,
#symbols #old ul {
    padding: 0 2rem;
}

aside {
    padding: 2rem;
}

aside,
#material fieldset,
#material fieldset button,
#material fieldset nav,
#material ul,
#material ul li button,
#material ul li ruby,
#symbols #old ul,
#symbols details summary {
    display: flex;
}

#material fieldset nav input[type="radio"] {
    display: none;
}

#symbols details summary {
    align-items: center;
}

#material ul,
#symbols #old ul {
    flex-wrap: wrap;
}

#material fieldset {
    flex-flow: row;
    flex-wrap: nowrap;
}

aside,
#material ul li button {
    flex-flow: column;
    align-items: start;
}

#material ul li ruby {
    flex-flow: column-reverse;
    align-items: start;
}

#material fieldset,
#material fieldset nav,
#material ul li button,
#symbols #old ul {
    justify-content: space-between;
}

#symbols details summary,
#symbols #old ul {
    gap: 1rem;
}

aside,
#material fieldset nav,
#material ul li ruby,
#material ul li button {
    gap: 0.5rem;
}

dialog#tag #close,
#symbols #old p {
    float: right;
}

#material fieldset,
#material fieldset button,
#material ul button,
dialog#tag #close {
    appearance: none;
    border: none;
    outline: none;
}

aside a:hover {
    text-decoration: underline dotted;
}

#material ul li u {
    border-radius: 1rem;
    text-decoration: none;
}

#material ul li u,
dialog#tag[open] {
    border: 0.1rem solid;
}

#material ul li {
    border-right: 0.1rem solid;
}

#material fieldset,
#symbols #new details:first-of-type {
    border-top: 0.1rem solid;
}

#material fieldset,
#material fieldset nav input[type="radio"]:checked+label,
#material ul li,
#symbols #new details {
    border-bottom: 0.1rem solid;
}

dialog#tag #close {
    font-size: 321%;
}

article ruby,
article b {
    font-size: 200%;
}

dialog#tag h3 {
    font-size: 150%;
}

dialog#tag section,
dialog#tag div h4,
#symbols div p {
    font-size: 123%;
}

dialog#tag div p {
    font-size: 111%;
}

article h2 ruby rt {
    font-size: 75%;
}

article section h2,
#symbols details summary b,
#symbols #old p b {
    font-weight: 500;
}

#material ul li button {
    text-align: start;
}

article ruby {
    ruby-align: start;
}

#material ul li ruby,
#material ul li u,
dialog#tag h3,
dialog#tag h4 {
    text-transform: uppercase;
}

article h2 ruby rt,
dialog#tag u,
#symbols details summary small {
    text-transform: capitalize;
}

#material ul,
#symbols #old ul {
    list-style: none inside;
}

dialog#tag {
    max-width: 500px;
}

#symbols #new img {
    height: 3.5rem;
}

#symbols img {
    pointer-events: none;
    user-select: none;
}

#material fieldset button,
#material fieldset nav {
    font-size: inherit;
}

#material ul li button {
    width: 100%;
}

#material fieldset button,
#material fieldset nav,
#symbols #old ul,
#symbols #old p {
    width: 50%;
}

article#cover {
    min-height: calc(100vh - 13.75rem);
}

#material ul li {
    background-position: 50% 60%;
    background-repeat: no-repeat;
    background-size: 50%;
}

#symbols #old ul li {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

#material ul li button {
    height: 100%;
}

#material ul li {
    width: calc(100% / 5);
    overflow: hidden;
}

#symbols #old ul li {
    width: 3.5rem;
    height: 3.5rem;
}

#material ul li,
#symbols #old ul li {
    aspect-ratio: 1 / 1;
}

dialog#tag #close {
    cursor: pointer;
}

#material ul li button:hover,
#symbols details summary:hover,
#symbols #old ul li:hover {
    cursor: help;
}

dialog#tag #close {
    position: sticky;
    top: 0;
}

@media (prefers-color-scheme: light) {

    #symbols details:not([open]):hover {
        background: #ccc;
        color: #fff;
    }

    dialog#tag {
        background: #fff;
        color: #000;
    }

    #symbols details:not([open]):hover img {
        filter: brightness(1) invert(1);
    }
}

@media (prefers-color-scheme: dark) {

    #symbols details:not([open]):hover {
        background: #fff;
        color: #000;
    }

    dialog#tag {
        background: #000;
        color: #fff;
    }

    #symbols details:not([open]):hover img,
    #symbols #old ul li:hover {
        filter: invert(0);
    }

    #symbols #old ul li:hover {
        background-color: #fff;
    }

    #symbols img,
    #symbols #old ul li {
        filter: invert(1);
    }
}

@media screen and (width: 1080px) {
    header,
    article section p  {
        display: none;
    }
}

@media screen and (max-width: 1500px) {
    #material ul li {
        width: calc(100% /4);
    }
}

@media screen and (max-width: 1080px) {

    #material fieldset button,
    #material fieldset nav {
        width: auto;
    }

    #material ul li {
        width: calc(100% /3);
    }
}

@media screen and (max-width: 750px) {

    article ruby,
    article b {
        font-size: 150%;
    }

    #material ul button {
        font-size: 111%;
    }

    #material nav {
        flex-flow: column;
        align-items: end;
    }

    #material ul li {
        width: calc(100% /2);
    }

    article#cover {
        min-height: 100vw;
    }

    dialog#tag {
        max-width: calc(100% - 2rem);
    }
}