footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 920px) {
    .topbar {
        justify-content: center;
    }

    .mobile-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 0;
        min-width: 88px;
    }

    .nav-content {
        position: fixed;
        top: 64px;
        left: 50%;
        right: auto;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 4px;
        row-gap: 0;
        width: min(220px, calc(100vw - 48px));
        padding: 6px 8px 8px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(-8px);
        transition: opacity 0.22s var(--ease-smooth), transform 0.22s var(--ease-smooth);
    }

    .nav-content.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .nav-content a.nav-route,
    .nav-content a.std-nav {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
        min-height: 32px;
        padding: 6px 8px;
        font-size: 0.86rem;
        text-align: center;
    }

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

    .nav-content .theme-toggle,
    .nav-content .nav-icon-link {
        width: 100%;
        min-height: 36px;
        margin: 4px 0 0;
        padding: 6px 0 0;
        justify-content: center;
        justify-self: center;
        align-self: center;
        border-top: 1px solid var(--border);
    }

    .nav-content .theme-toggle {
        grid-column: 1;
    }

    .nav-content .nav-icon-link:first-of-type {
        grid-column: 2;
    }

    .nav-content .nav-icon-link:last-of-type {
        grid-column: 3;
    }

    .feature-grid,
    .team-grid,
    .link-grid,
    .split-section {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .topbar {
        width: min(100% - 24px, 1120px);
    }

    .hero {
        min-height: auto;
        padding: 14px 0 42px;
    }

    .game-logo {
        width: min(430px, 92vw);
    }

    .hero h1 {
        font-size: clamp(2.55rem, 15vw, 4.8rem);
    }

    .btn-group,
    .btn {
        width: 100%;
    }

    .compact-section {
        padding: 30px 0;
    }

    .feature-grid,
    .team-grid,
    .link-grid,
    .split-section {
        grid-template-columns: 1fr;
    }

    .panel-card {
        min-height: auto;
    }

    .gallery-grid {
        column-count: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .game-logo {
        animation: none;
    }
}
