.atm-map-shell {
    width: min(1280px, calc(100vw - 32px)) !important;
    max-width: 1280px !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%);
    margin: 0 !important;
}

.atm-map-wrap {
    width: 100% !important;
    max-width: none !important;
    position: relative !important;
    left: auto !important;
    margin: 0 !important;
}

.atm-map {
    width: 100% !important;
    max-width: 100% !important;
    height: min(68vh, 680px) !important;
    min-height: 560px !important;
}

/* トップページだけ「ホーム」のページタイトルを隠す */
body.home .wp-block-post-title,
body.home .entry-title {
    display: none !important;
}

/* タイトルを消した後の余白も詰める */
body.home main,
body.home .wp-block-post-content,
body.home .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.home main > .wp-block-group:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.atm-map-filters {
    width: 100%;
    max-width: none;
    margin: 0 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.atm-filter-button {
    appearance: none;
    border: 1px solid #d3d6da;
    border-radius: 999px;
    background: #fff;
    color: #25282c;
    padding: 7px 12px;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
}

.atm-filter-button:hover {
    border-color: #8b9299;
}

.atm-filter-button.is-active {
    background: #202428;
    border-color: #202428;
    color: #fff;
}

.atm-filter-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: 1px;
}

.atm-filter-haison { background: #2f7d32; }
.atm-filter-gunji { background: #3f4246; }

.atm-map-legend {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 500;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 6px;
    padding: 7px 9px;
    font-size: 12px;
    line-height: 1.6;
    box-shadow: 0 1px 5px rgba(0,0,0,.12);
}

.atm-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    border: 1px solid #fff;
    vertical-align: -1px;
}

.atm-legend-haison { background: #2f7d32; }
.atm-legend-gunji { background: #3f4246; }

@media (max-width: 782px) {
    .atm-map-shell {
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        transform: none;
    }

    .atm-map-wrap,
    .atm-map-filters {
        width: 100% !important;
    }

    .atm-map-filters {
        gap: 6px;
    }

    .atm-filter-button {
        padding: 7px 10px;
        font-size: 12px;
    }

    .atm-map {
        height: 62vh !important;
        min-height: 420px !important;
    }
}
