.lf-map-page {
    width: 100%;
    margin: 0;
    padding: 0;
}

.lf-map-inner {
    width: 100%;
    max-width: 1200px;
    margin: 12px auto;
    padding: 0 12px;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .lf-map-inner {
        margin: 10px auto;
        padding: 0 10px;
    }
}
@media (max-width: 600px) {
    .lf-map-inner {
        margin: 6px auto;
        padding: 0 10px;
    }
}

.lf-map-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 18px 0 12px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.lf-map-header h1 {
    margin: 0;
    font-size: 22px;
}

.lf-map-sub {
    font-size: 13px;
    opacity: 0.85;
}

.lf-map-container {
    height: calc(100vh - 180px);
    min-height: 520px;
}

.lf-map-noscript {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.lf-osm-ads-layer {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
}

.lf-osm-ads-lines {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
}

.lf-osm-ads-lines line {
    stroke: rgba(249, 115, 22, 0.55);
    stroke-width: 2;
    stroke-linecap: round;
}

.lf-osm-ads-marker {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: rgba(249, 115, 22, 0.96);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.lf-osm-ads-marker:hover {
    filter: brightness(1.03);
}

.lf-osm-ads-marker:focus-visible {
    outline: 2px solid rgba(249, 115, 22, 0.9);
    outline-offset: 2px;
}

.lf-osm-ads-hint {
    position: absolute;
    left: 56px;
    top: 8px;
    z-index: 12;
    max-width: min(520px, calc(100% - 64px));
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    display: none;
}

.lf-osm-ads-hint-text {
    font-size: 12px;
    font-weight: 800;
    color: rgba(31, 41, 55, 0.92);
}

.lf-osm-ads-hint-sub {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(31, 41, 55, 0.78);
}

html[data-theme="dark"] .lf-map-noscript {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .lf-osm-ads-hint {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .lf-osm-ads-hint-text {
    color: rgba(241, 245, 249, 0.92);
}

html[data-theme="dark"] .lf-osm-ads-hint-sub {
    color: rgba(241, 245, 249, 0.74);
}

/* Popup System */
.lf-osm-ads-popup {
    position: absolute;
    width: 200px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    z-index: 9;
    pointer-events: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.lf-osm-ads-popup-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: #f3f4f6;
}

.lf-osm-ads-popup-body {
    padding: 8px 10px;
}

.lf-osm-ads-popup-title {
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lf-osm-ads-popup-price {
    font-size: 14px;
    font-weight: 800;
    color: #f97316;
    margin: 0 0 6px;
}

.lf-osm-ads-popup-city {
    font-size: 11px;
    color: #6b7280;
    margin: 0;
}

.lf-osm-ads-popup-link {
    display: block;
    margin-top: 8px;
    padding: 6px 8px;
    background: #f97316;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.lf-osm-ads-popup-link:hover {
    background: #ea580c;
}

.lf-osm-ads-popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lf-osm-ads-popup-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .lf-osm-ads-popup {
    background: #1e293b;
    border-color: rgba(51, 65, 85, 0.9);
}

html[data-theme="dark"] .lf-osm-ads-popup-title {
    color: #f1f5f9;
}

html[data-theme="dark"] .lf-osm-ads-popup-city {
    color: #94a3b8;
}

html[data-theme="dark"] .lf-osm-ads-lines line {
    stroke: rgba(249, 115, 22, 0.75);
}
