@media (max-width: 980px) {
    .site-sidebar {
        width: min(370px, calc(100vw - 18px));
        border-radius: 0 24px 24px 0;
    }

    .sidebar-brand {
        grid-template-columns: 1fr;
        padding-right: 52px;
    }

    .sidebar-resident {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
    }

    .sidebar-resident .sidebar-avatar {
        width: 58px;
        min-width: 58px;
        height: 58px;
    }

    .sidebar-resident-copy strong {
        font-size: 1.05rem;
    }

    .sidebar-notification-link {
        grid-template-columns: 46px minmax(0, 1fr) auto auto;
        min-height: 62px;
        gap: 10px;
        padding: 10px 12px;
    }

    .sidebar-notification-icon {
        width: 44px;
        height: 44px;
    }

    .sidebar-flat-coin {
        grid-template-columns: 46px minmax(0, 1fr);
        min-height: 72px;
        padding: 12px 44px 12px 12px;
    }

    .sidebar-flat-coin-art {
        width: 44px;
        height: 44px;
    }

    .sidebar-flat-coin-art img {
        width: 32px;
        height: 32px;
    }

    .sidebar-scroll::before {
        left: 13px;
    }

    .sidebar-nav {
        padding-left: 17px;
    }

    .sidebar-nav a {
        grid-template-columns: 44px minmax(0, 1fr) auto auto;
        min-height: 58px;
        padding: 7px 12px;
    }

    .sidebar-nav a::after {
        left: -22px;
    }

    .sidebar-nav-icon-shell {
        width: 38px;
        height: 38px;
    }

    .sidebar-nav-icon {
        width: 17px;
        height: 17px;
    }

    .sidebar-nav-label {
        font-size: 0.92rem;
    }

    .sidebar-nav-description {
        font-size: 0.72rem;
    }

    .sidebar-nav-index {
        font-size: 0.96rem;
    }
}

@media (max-width: 640px) {
    .site-sidebar {
        width: min(370px, calc(100vw - 14px));
        padding: 12px;
    }

    .sidebar-top,
    .sidebar-bottom {
        gap: 10px;
    }

    .sidebar-resident {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 11px;
    }

    .sidebar-resident .sidebar-avatar {
        width: 54px;
        min-width: 54px;
        height: 54px;
    }

    .sidebar-resident-meta {
        gap: 5px;
    }

    .sidebar-resident-meta small:not(.sidebar-tier-pill) {
        display: none;
    }

    .sidebar-tier-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-notification-link {
        grid-template-columns: 42px minmax(0, 1fr) auto auto;
        min-height: 58px;
        border-radius: 16px;
    }

    .sidebar-notification-icon {
        width: 40px;
        height: 40px;
    }

    .sidebar-panel-chevron {
        width: 10px;
        height: 10px;
    }

    .sidebar-flat-coin {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 68px;
        border-radius: 16px;
    }

    .sidebar-flat-coin-art {
        width: 40px;
        height: 40px;
    }

    .sidebar-flat-coin-art img {
        width: 30px;
        height: 30px;
    }

    .sidebar-flat-coin-copy strong {
        font-size: 1.04rem;
    }

    .sidebar-scroll {
        padding-block: 8px;
    }

    .sidebar-nav {
        gap: 5px;
        padding-left: 16px;
    }

    .sidebar-nav-section {
        gap: 6px;
    }

    .sidebar-nav a {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        min-height: 56px;
        gap: 9px;
        padding: 7px 10px;
        border-radius: 16px;
    }

    .sidebar-nav-badge {
        display: none;
    }

    .sidebar-nav-index {
        font-size: 0.9rem;
    }

    .sidebar-nav-label {
        font-size: 0.9rem;
    }

    .sidebar-nav-description {
        font-size: 0.7rem;
    }

    .sidebar-nav-icon-shell {
        width: 36px;
        height: 36px;
    }

    .sidebar-nav-icon {
        width: 16px;
        height: 16px;
    }

    .sidebar-fair-use {
        border-radius: 16px;
    }
}

@media (max-height: 720px) {
    .sidebar-resident .sidebar-avatar {
        width: 48px;
        min-width: 48px;
        height: 48px;
    }

    .sidebar-resident {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .sidebar-nav a {
        min-height: 52px;
    }

    .sidebar-nav-description {
        display: none;
    }
}

@media (max-width: 980px) {
    .site-sidebar {
        width: min(296px, calc(100vw - 14px));
        padding: 10px;
        border-radius: 0 18px 18px 0;
    }

    .sidebar-brand {
        grid-template-columns: minmax(0, 1fr) 40px;
        gap: 8px;
        padding-right: 0;
    }

    .site-sidebar .brand {
        grid-template-columns: 40px minmax(0, 1fr);
        min-height: 44px;
        padding: 2px;
    }

    .site-sidebar .brand-logo {
        width: 40px;
        height: 40px;
    }

    .sidebar-collapse-toggle {
        width: 40px;
        height: 40px;
    }

    .sidebar-resident.sidebar-account {
        grid-template-columns: 40px minmax(0, 1fr);
        min-height: 54px;
        gap: 8px;
        padding: 7px;
    }

    .sidebar-resident.sidebar-account .sidebar-avatar {
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

    .sidebar-notification-link {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        min-height: 46px;
        gap: 8px;
        padding: 7px 9px;
    }

    .sidebar-notification-icon {
        width: 30px;
        height: 30px;
    }

    .sidebar-flat-coin {
        grid-template-columns: 36px minmax(0, 1fr);
        min-height: 60px;
        gap: 8px;
        padding: 8px 36px 8px 9px;
    }

    .sidebar-flat-coin-art {
        width: 36px;
        height: 36px;
    }

    .sidebar-flat-coin-art img {
        width: 28px;
        height: 28px;
    }

    .sidebar-nav {
        gap: 3px;
        padding: 0;
    }

    .sidebar-nav-section {
        gap: 3px;
    }

    .sidebar-nav a {
        grid-template-columns: 23px minmax(0, 1fr) auto;
        min-height: 38px;
        gap: 8px;
        padding: 0 9px;
        border-radius: 10px;
    }

    .sidebar-nav a::after {
        display: none;
    }

    .sidebar-nav-icon-shell {
        width: 22px;
        height: 22px;
    }

    .sidebar-nav-icon {
        width: 18px;
        height: 18px;
    }

    .sidebar-nav-label {
        font-size: 0.86rem;
    }

    .sidebar-nav-description,
    .sidebar-nav-index {
        display: none;
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .site-sidebar {
        width: min(290px, calc(100vw - 12px));
        padding: 9px;
    }

    .sidebar-top,
    .sidebar-bottom {
        gap: 8px;
    }

    .site-sidebar .brand strong {
        font-size: 0.9rem;
    }

    .sidebar-resident-copy strong {
        font-size: 0.88rem;
    }

    .sidebar-resident-meta small:not(.sidebar-tier-pill) {
        display: none;
    }

    .sidebar-notification-copy strong {
        font-size: 0.8rem;
    }

    .sidebar-notification-copy small,
    .sidebar-flat-coin-copy small {
        font-size: 0.64rem;
    }

    .sidebar-flat-coin-copy strong {
        font-size: 0.94rem;
    }

    .sidebar-nav-heading {
        padding-inline: 8px;
    }

    .sidebar-nav a {
        min-height: 37px;
        padding-inline: 8px;
    }

    .sidebar-fair-use {
        min-height: 66px;
        padding: 9px 36px 9px 9px;
    }

    .sidebar-fair-use-row strong {
        font-size: 0.94rem;
    }
}

@media (max-height: 720px) {
    .sidebar-resident.sidebar-account {
        min-height: 50px;
    }

    .sidebar-notification-link {
        min-height: 42px;
    }

    .sidebar-flat-coin {
        min-height: 54px;
    }

    .sidebar-nav a {
        min-height: 35px;
    }

    .sidebar-fair-use {
        min-height: 60px;
    }
}

