/* Mobile responsive styles */
@media (max-width: 768px) {
    header {
        padding: 0 10px;
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        position: relative;
    }

    .hamburger-btn {
        display: block;
    }

    .logo {
        height: 28px;
        margin-right: 10px;
    }

    nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 10px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: calc(100vh - 56px);
        max-height: calc(100dvh - 56px);
        overflow-y: auto;
    }

    nav.open {
        display: flex;
    }

    .nav-btn {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        font-size: 14px;
        white-space: nowrap;
    }

    .nav-btn:last-child {
        border-bottom: none;
    }

    .my-adoptions-btn,
    .sync-btn,
    .login-btn {
        display: none;
    }

    .mobile-nav-actions {
        display: flex;
        gap: 8px;
        padding: 12px 16px 8px;
        border-top: 1px solid var(--border);
        margin-top: 4px;
    }

    .mobile-adoptions-btn {
        flex: 1;
        background: var(--accent);
        border: none;
        border-radius: 8px;
        color: #fff;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 44px;
    }

    .mobile-adoptions-btn .adoption-count {
        background: rgba(255, 255, 255, 0.3);
        color: #fff;
        border-radius: 10px;
        padding: 2px 8px;
        font-size: 12px;
        font-weight: 700;
    }

    .mobile-login-btn {
        background: rgba(102, 126, 234, 0.15);
        border: 1px solid rgba(102, 126, 234, 0.3);
        border-radius: 8px;
        color: var(--accent);
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        min-height: 44px;
    }

    .adoption-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .map-hero {
        padding: 8px 12px 4px;
        gap: 10px;
    }

    .hero-logo {
        width: 100px;
    }

    .map-title {
        font-size: 1.4rem !important;
        line-height: 1.3;
    }

    .map-subtitle {
        font-size: 0.85rem !important;
        margin-top: 2px !important;
    }

    .map-intro {
        padding: 12px 12px 24px;
    }

    #map-container {
        min-height: 250px;
        aspect-ratio: 4 / 3;
        margin-top: 8px;
    }

    #map-svg, #dot-container {
        width: 100% !important;
        height: 100% !important;
    }

    #sidebar-panel {
        width: 100%;
        max-width: 100%;
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }

    .search-input {
        width: 100%;
        min-width: unset;
    }

    .filter-select {
        min-width: 0;
        flex: 1 1 calc(50% - 4px);
    }

    /* P1: Sidebar close button — 44px touch target */
    .close-btn {
        width: 44px;
        height: 44px;
        font-size: 22px;
        top: 10px;
        right: 10px;
    }

    /* P1: Reduce padding on about/prayer views */
    #prayer-view,
    #about-view {
        padding: 12px;
    }

    .about-section {
        padding: 16px;
    }

    /* P1: Hemicycle containers — responsive height */
    .hemicycle-container {
        height: auto;
        min-height: 280px;
        max-height: 70vh;
        aspect-ratio: 3 / 2;
    }

    /* P1: Touch-action to prevent browser gesture interference */
    #map-svg, #dot-container {
        touch-action: none;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 24px;
    }

    .nav-btn {
        padding: 8px 8px;
        font-size: 11px;
    }

    header {
        padding: 0 5px;
    }

    .map-hero {
        padding: 6px 10px 4px;
        gap: 8px;
    }

    .hero-logo {
        width: 80px;
    }

    .map-title {
        font-size: 1.2rem !important;
    }

    .map-subtitle {
        font-size: 0.8rem !important;
    }

    #map-container {
        margin-top: 6px;
    }
}

