.i7tou-nearby-map-section {
    margin: 28px 0;
    padding: 18px;
    border: 1px solid #e7e2d8;
    border-radius: 18px;
    background: #fffaf3;
    box-sizing: border-box;
}

.i7tou-nearby-map-head {
    margin-bottom: 14px;
}

.i7tou-nearby-map-title {
    margin: 0 0 10px;
    font-size: 2.65rem;
    line-height: 1.23;
    font-weight: 800;
}

.i7tou-nearby-map-subtitle {
    margin: 0 0 16px;
    color: #6f675d;
    font-size: 1.7rem;
    line-height: 1.68;
}

.i7tou-nearby-map-filter,
.i7tou-nearby-map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.i7tou-map-filter-btn,
.i7tou-map-action-btn {
    appearance: none;
    border: 1px solid #d7cbbd;
    border-radius: 999px;
    background: #ffffff;
    color: #3f362e;
    cursor: pointer;
    font-size: 1.24rem;
    line-height: 1;
    font-weight: 800;
    padding: 13px 19px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.i7tou-map-filter-btn:hover,
.i7tou-map-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}

.i7tou-map-filter-btn.is-active,
.i7tou-map-action-btn {
    background: #3f7f5f;
    border-color: #3f7f5f;
    color: #fff;
}

.i7tou-map-action-btn.secondary {
    background: #ffffff;
    border-color: #d7cbbd;
    color: #3f362e;
}

.i7tou-map-filter-btn[disabled],
.i7tou-map-action-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.i7tou-map-filter-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 5px;
    border-radius: 999px;
    vertical-align: middle;
    background: #999;
}

.i7tou-map-filter-dot.spot {
    background: #2d75c7;
}

.i7tou-map-filter-dot.food {
    background: #d96b39;
}

.i7tou-map-filter-dot.current {
    background: #2f9d58;
}

.i7tou-map-status {
    color: #776e64;
    font-size: 1.14rem;
    line-height: 1.6;
    font-weight: 700;
}

.i7tou-nearby-osm {
    position: relative;
    width: 100%;
    height: 460px;
    overflow: hidden;
    border-radius: 18px;
    background: #eee7dc;
}

.i7tou-map-lazy-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    color: #74685e;
    font-size: .95rem;
    text-align: center;
    background: linear-gradient(135deg, #f7f0e6 0%, #eee4d8 100%);
}

.i7tou-nearby-map-section.is-loading .i7tou-map-lazy-placeholder::after {
    content: '';
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid rgba(0, 0, 0, .18);
    border-top-color: rgba(0, 0, 0, .55);
    border-radius: 50%;
    animation: i7tou-map-spin .8s linear infinite;
}

@keyframes i7tou-map-spin {
    to {
        transform: rotate(360deg);
    }
}

.i7tou-leaflet-divicon {
    background: transparent;
    border: 0;
}

.i7tou-map-marker-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
}

.i7tou-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 3px solid #ffffff;
    border-radius: 999px 999px 999px 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
    color: #ffffff;
    position: relative;
    flex: 0 0 32px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
}

.i7tou-map-marker-spot {
    background: #2d75c7;
}

.i7tou-map-marker-food {
    background: #d96b39;
}

.i7tou-map-marker-current {
    background: #2f9d58;
}

.i7tou-map-marker-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 1;
    transform: rotate(45deg);
    transform-origin: 50% 50%;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-feature-settings: "halt" 1;
    -webkit-font-smoothing: antialiased;
    font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}


.i7tou-map-marker-name {
    display: none;
    max-width: 112px;
    margin-top: 4px;
    padding: 3px 7px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    color: #342a22;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.i7tou-nearby-osm.i7tou-map-show-labels .i7tou-map-marker-name {
    display: block;
}

@media (max-width: 640px) {
    .i7tou-map-marker {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 14px;
    }

    .i7tou-map-marker-text {
        font-size: 14px;
        line-height: 1;
        writing-mode: horizontal-tb;
        text-orientation: mixed;
    }
}

.i7tou-map-popup {
    width: 250px;
    max-width: 100%;
    font-family: inherit;
}

.i7tou-map-popup-current {
    width: auto;
    min-width: 90px;
    padding: 4px 2px;
    text-align: center;
}

.i7tou-map-popup-img {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
}

.i7tou-map-popup-body {
    line-height: 1.55;
}

.i7tou-map-popup-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.i7tou-map-popup-badge,
.i7tou-map-popup-distance {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    padding: 5px 8px;
}

.i7tou-map-popup-badge.spot {
    background: #e9f2ff;
    color: #1d5b9e;
}

.i7tou-map-popup-badge.food {
    background: #fff0e8;
    color: #a14b22;
}

.i7tou-map-popup-distance {
    background: #f1eee9;
    color: #6c6258;
}

.i7tou-map-popup-title {
    color: #24201c;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Popup title link: keep one underline only; prevent theme hover underline overlays */
.leaflet-container .i7tou-map-popup-title-link,
.leaflet-container .i7tou-map-popup-title-link:visited,
.leaflet-container .i7tou-map-popup-title-link:hover,
.leaflet-container .i7tou-map-popup-title-link:focus,
.leaflet-container .i7tou-map-popup-title-link:active,
.content-area .leaflet-container .i7tou-map-popup-title-link,
.content-area .leaflet-container .i7tou-map-popup-title-link:hover,
.content-area .leaflet-container .i7tou-map-popup-title-link:focus {
    color: #2d75c7 !important;
    text-decoration-line: underline !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 2px !important;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background: none !important;
    background-image: none !important;
    background-size: 0 0 !important;
    outline: none;
}

.leaflet-container .i7tou-map-popup-title-link::before,
.leaflet-container .i7tou-map-popup-title-link::after,
.content-area .leaflet-container .i7tou-map-popup-title-link::before,
.content-area .leaflet-container .i7tou-map-popup-title-link::after {
    content: none !important;
    display: none !important;
}

.i7tou-map-popup-desc {
    color: #5f564e;
    font-size: 13px;
    margin-bottom: 9px;
}

.i7tou-map-popup-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.i7tou-map-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #3f7f5f;
    color: #ffffff !important;
    font-size: 13px;
    line-height: 1;
    padding: 8px 11px;
    text-decoration: none !important;
}

.i7tou-map-popup-btn.secondary {
    background: #2d75c7;
}

@media (max-width: 640px) {
    .i7tou-nearby-map-section {
        margin: 22px 0;
        padding: 14px;
        border-radius: 16px;
    }

    .i7tou-nearby-map-title {
        font-size: 2.25rem;
        line-height: 1.25;
    }

    .i7tou-nearby-map-subtitle {
        font-size: 1.44rem;
        line-height: 1.65;
    }

    .i7tou-nearby-osm {
        height: 380px;
        border-radius: 15px;
    }

    .i7tou-map-filter-btn,
    .i7tou-map-action-btn {
        font-size: 1.28rem;
        padding: 12px 15px;
    }

    .i7tou-map-status {
        width: 100%;
        font-size: 1.08rem;
    }

    .i7tou-map-marker-name {
        max-width: 96px;
        font-size: 11px;
        padding: 3px 6px;
    }

    .i7tou-map-popup {
        width: 220px;
    }

    .i7tou-map-popup-img {
        height: 112px;
    }
}


@media (max-width: 420px) {
    .i7tou-map-filter-btn,
    .i7tou-map-action-btn {
        font-size: 1.16rem;
        padding: 12px 13px;
    }

    .i7tou-map-status {
        font-size: 1.08rem;
    }

    .i7tou-nearby-map-title {
        font-size: 2.12rem;
        line-height: 1.23;
    }

    .i7tou-nearby-map-subtitle {
        font-size: 1.30rem;
        line-height: 1.62;
    }
}
