body.memos-page {
    display: block;
    padding: max(120px, 14vh) 10vw 12vh;
    font-family: "Source Code Pro", monospace;
}

.memo-library {
    width: calc(100% - 180px);
    max-width: 52rem;
}

.memo-library h1 {
    margin: 0 0 2.5rem;
    font-size: 1rem;
    font-weight: inherit;
}

.memo-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.memo-link {
    display: inline-block;
    max-width: 100%;
    font: inherit;
    line-height: 1.6;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}

.memo-link[aria-current="true"] {
    font-weight: 600;
}

.memo-link:hover,
.memo-controls button:not(:disabled):hover {
    animation: fade2 1.74s linear infinite normal;
}

/* The controls' center stays two-thirds down the viewport, even while scrolling. */
.memo-player {
    position: fixed;
    top: max(120px, 16vh);
    right: 10vw;
    bottom: calc(33.333vh - 22px);
    width: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.memo-timeline {
    position: relative;
    flex: 1;
    width: 48px;
    min-height: 40px;
    touch-action: none;
    user-select: none;
}

.memo-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: currentColor;
}

.memo-progress {
    position: absolute;
    top: calc((1 - var(--progress, 0)) * 100%);
    left: 50%;
    width: 32px;
    height: 1px;
    background: currentColor;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.memo-controls {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.memo-controls button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
    cursor: none;
}

.memo-controls button:disabled {
    opacity: 0.35;
}

.memo-link:focus-visible,
.memo-controls button:focus-visible,
.memo-timeline:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 5px;
}

.memo-error {
    margin-top: 2rem;
    font-size: 0.875rem;
}

.memo-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@supports (height: 100svh) {
    .memo-player {
        top: max(120px, 16svh);
        bottom: calc(33.333svh - 22px);
    }
}

@media (max-width: 600px) {
    body.memos-page {
        padding-left: 6vw;
        padding-right: 6vw;
    }

    .memo-library {
        width: calc(100% - 110px);
    }

    .memo-link {
        font-size: 0.875rem;
    }

    .memo-player {
        right: 6vw;
        width: 96px;
    }

    .memo-controls {
        gap: 4px;
    }

    .memo-controls button {
        font-size: 0.75rem;
    }
}

@media (max-height: 450px) {
    .memo-player {
        top: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .memo-link:hover,
    .memo-controls button:not(:disabled):hover {
        animation: none;
    }
}
