@media (max-width: 1180px) {
    .widgets-rail {
        width: 320px;
    }
}

@media (max-width: 920px) {
    body {
        overflow: auto;
    }

    .desktop {
        min-height: calc(100vh - 106px);
        padding-bottom: 140px;
    }

    .desktop-icons {
        position: relative;
        inset: auto;
        width: auto;
        max-height: none;
        padding: 18px 16px 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-flow: row;
        grid-auto-columns: auto;
        gap: 12px 8px;
    }

    .desktop-shortcut {
        width: auto;
        min-height: 96px;
        min-width: 0;
    }

    .widgets-rail {
        position: relative;
        top: auto;
        right: auto;
        width: auto;
        max-height: none;
        margin: 16px;
    }

    .app-window {
        position: fixed;
        inset: 14px 10px 104px !important;
        width: auto !important;
        height: auto !important;
    }

    .app-window.is-maximized {
        inset: 14px 10px 104px !important;
    }

    .hero-panel,
    .content-grid,
    .skills-grid,
    .credentials-grid,
    .project-grid,
    .contact-grid,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .launcher-strip,
    .start-grid,
    .recommended-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .span-2,
    .span-3 {
        grid-column: auto;
    }

    .taskbar {
        width: calc(100vw - 16px);
        grid-template-columns: auto 1fr;
        gap: 8px;
        bottom: 8px;
    }

    .taskbar-right {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .taskbar-center {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .start-menu {
        left: 8px;
        right: 8px;
        width: auto;
        transform: none;
        bottom: 92px;
    }

    .start-menu:not([hidden]) {
        animation: startMenuInLeft 180ms ease both;
    }

    .start-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .minesweeper-grid,
    .memory-grid {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .desktop {
        min-height: calc(100vh - 92px);
        padding-bottom: 124px;
    }

    .desktop-icons {
        padding: 14px 10px 0;
        gap: 10px 4px;
    }

    .desktop-shortcut {
        min-height: 88px;
        padding: 6px 4px 8px;
        gap: 8px;
    }

    .shortcut-label {
        max-width: none;
        font-size: 0.72rem;
    }

    .icon-badge {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .icon-badge svg {
        width: 24px;
        height: 24px;
    }

    .launcher-strip {
        grid-template-columns: 1fr;
    }

    .start-grid,
    .recommended-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .widget-card,
    .hero-copy,
    .hero-sidecard,
    .content-card,
    .project-card,
    .contact-card,
    .window-body {
        padding: 16px;
    }

    .window-chrome {
        padding: 12px 14px;
    }

    .taskbar {
        width: calc(100vw - 12px);
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 64px;
        padding: 8px 10px;
        gap: 6px;
        bottom: 6px;
        border-radius: 22px;
    }

    .taskbar-left,
    .taskbar-center,
    .taskbar-right,
    .taskbar-running {
        gap: 6px;
    }

    .taskbar-core,
    .taskbar-app {
        min-height: 44px;
        border-radius: 15px;
    }

    .taskbar-core {
        width: 44px;
    }

    .taskbar-app {
        width: 46px;
    }

    .taskbar-app::after {
        bottom: 5px;
        width: 14px;
    }

    .app-icon--sm {
        width: 32px;
        height: 32px;
        border-radius: 11px;
    }

    .app-icon--sm svg {
        width: 17px;
        height: 17px;
    }

    .windows-glyph,
    .widgets-glyph {
        width: 16px;
        height: 16px;
    }

    .taskbar-right {
        grid-column: auto;
        justify-content: flex-end;
        gap: 10px;
        padding-inline: 0;
        white-space: nowrap;
    }

    .tray-power-button {
        width: 36px;
        height: 36px;
        border-radius: 14px;
    }

    .power-glyph {
        width: 14px;
        height: 14px;
    }

    .power-glyph::before {
        top: -6px;
        height: 9px;
    }

    .system-clock {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        font-size: 0.74rem;
        line-height: 1;
    }

    #taskbar-date {
        display: none;
    }

    .taskbar-center {
        padding-bottom: 0;
    }

    .start-menu {
        bottom: 76px;
    }
}
