*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    content-visibility: auto;
}

body {
    background-color: #008080;
    text-rendering: optimizeSpeed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: currentColor;
    font-weight: 700;
    font-size: 1rem;
}

main {
    display: grid;
    padding: .6rem;
    grid-template-columns: repeat(auto-fit, 64px);
    grid-auto-rows: max-content;
    gap: 1rem;
    flex: 1;
}

.shortcut {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
    gap: .5rem;
    padding: 6px;
    max-width: 64px;
    text-overflow: ellipsis;
}

.shortcut img {
    image-rendering: crisp-edges;
    aspect-ratio: 1/1;
}

.shortcut:hover {
    background: #677bfd54;
    cursor: pointer;
}

dialog.window[id] {
    width: 250px;
    height: 220px;
    border: unset;
    position: absolute;

    .window-body {
        overflow: auto;
        height: calc(100% - 36px);

        a {
            color: blue;
            text-decoration: underline;
        }
    }

    .title-bar-text {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        flex-shrink: 0;
        width: calc(100% - 74px);
        text-overflow: ellipsis;
        overflow: hidden;
    }

    &:focus-visible {
        outline: 0;
    }
}

form.title-bar-controls button {
    cursor: pointer;
}

audio {
    max-height: 40px;
}

footer {
    padding: .25rem;
    background-color: var(--button-face);
    color: black;
    border-top: 1px solid var(--button-highlight);
    outline: 1px solid var(--button-face);
}

footer a {
    display: inline-flex;
    gap: .5rem;
    color: #000;
    padding: .1rem .25rem;
    box-shadow: var(--border-raised-outer), var(--border-raised-inner);
}

footer a:active {
    box-shadow: var(--border-sunken-outer), var(--border-sunken-inner);
}

footer a img {
    height: 16px;
}

.test {
    image-rendering: pixelated;
}