.sysnotes-post-navigation {
    width: 100%;
    max-width: 1040px;
    margin: 5rem auto 2rem;
    padding: 0 2rem;
}

.sysnotes-post-navigation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}

.sysnotes-post-nav-card {
    display: flex;
    min-height: 13rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;

    padding: 2.2rem;

    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;

    background: #f7f7f8;
    color: #15171a;
    text-decoration: none;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.sysnotes-post-nav-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 122, 255, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.sysnotes-post-nav-card.is-next {
    text-align: right;
}

.sysnotes-post-nav-card.is-empty {
    visibility: hidden;
}

.sysnotes-post-nav-direction {
    color: #6b7280;
    font-size: 1.35rem;
    font-weight: 600;
}

.sysnotes-post-nav-title {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.sysnotes-scroll-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 100;

    display: flex;
    width: 4.6rem;
    height: 4.6rem;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: #15171a;
    color: #fff;

    font-size: 2rem;
    font-weight: 700;

    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        background-color 0.2s ease;
}

.sysnotes-scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sysnotes-scroll-top:hover {
    background: #007aff;
}

.sysnotes-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;

    width: 100%;
    height: 3px;

    background: transparent;
    pointer-events: none;
}

.sysnotes-reading-progress-bar {
    width: 0;
    height: 100%;
    background: #007aff;
    transition: width 0.05s linear;
}

@media (max-width: 700px) {
    .sysnotes-post-navigation {
        margin-top: 3.5rem;
        padding: 0 1.6rem;
    }

    .sysnotes-post-navigation-grid {
        grid-template-columns: 1fr;
    }

    .sysnotes-post-nav-card {
        min-height: auto;
        padding: 1.8rem;
    }

    .sysnotes-post-nav-card.is-next {
        text-align: left;
    }

    .sysnotes-post-nav-card.is-empty {
        display: none;
    }

    .sysnotes-scroll-top {
        right: 1.2rem;
        bottom: 1.2rem;
        width: 4.2rem;
        height: 4.2rem;
    }
}

@media (prefers-color-scheme: dark) {
    .sysnotes-post-nav-card {
        border-color: rgba(255, 255, 255, 0.12);
        background: #202124;
        color: #fff;
    }

    .sysnotes-post-nav-direction {
        color: #aeb4bd;
    }
}
