.m2o-map-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px;
    color: #E8DCC4;
    background: linear-gradient(160deg, rgba(20, 17, 13, 0.96) 0%, rgba(14, 12, 9, 0.96) 100%);
    border: 1px solid rgba(201, 162, 90, 0.16);
    border-radius: 12px;
    box-sizing: border-box;
}
.m2o-map-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.m2o-map-header h1 {
    margin: 0 0 4px;
    color: #E0BB74;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    letter-spacing: 0.5px;
}
.m2o-map-header p {
    margin: 0;
    color: #9C8F78;
    font-size: 13px;
    line-height: 1.5;
}
.m2o-map-admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 116, 40, 0.18);
    border: 1px solid rgba(255, 116, 40, 0.4);
    color: #FFB27A;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.m2o-map-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.m2o-map-header-actions a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid rgba(201, 162, 90, 0.4);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: #E0BB74;
    text-decoration: none;
    font-size: 13px;
}
.m2o-map-header-actions a:hover {
    border-color: #C9A25A;
    background: rgba(201, 162, 90, 0.1);
}
.m2o-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: stretch;
}
.m2o-map-main {
    min-width: 0;
}
.m2o-map-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 78vh;
    border: 1px solid #3A3124;
    border-radius: 10px;
    background: #101914;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}
.m2o-map-wrap.dragging {
    cursor: grabbing;
}
.m2o-map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    filter: saturate(0.88) contrast(0.98);
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    user-select: none;
}
.m2o-markers {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.m2o-map-marker {
    position: absolute;
    width: 13px;
    height: 13px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    border: 2px solid #111;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    z-index: 3;
    pointer-events: auto;
}
.m2o-map-marker:hover {
    transform: scale(1.45);
    z-index: 6;
}
.m2o-map-marker.selected {
    outline: 2px solid #F1E3C7;
    outline-offset: 2px;
    z-index: 7;
}
.m2o-map-marker.own {
    box-shadow: 0 0 0 3px #E0BB74, 0 1px 5px rgba(0, 0, 0, 0.85);
}
.m2o-map-marker.player {
    background: #7FC78A;
    border-color: #F1E3C7;
    width: 15px;
    height: 15px;
    margin: -7px 0 0 -7px;
    z-index: 8;
}
.m2o-map-marker-label {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    transform: translate(-50%, 10px);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 14, 11, 0.92);
    border: 1px solid rgba(201, 162, 90, 0.35);
    color: #F1E3C7;
    font-size: 9.5px;
    white-space: nowrap;
}
.m2o-map-zoom {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid #3A3124;
    border-radius: 7px;
    background: rgba(16, 14, 11, 0.92);
}
.m2o-map-zoom button {
    height: 24px;
    min-width: 24px;
    padding: 0 6px;
    border: 1px solid #3A3124;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    color: #E8DCC4;
    font-size: 12px;
    cursor: pointer;
}
.m2o-map-zoom button:hover {
    border-color: #C9A25A;
}
.m2o-map-zoom span {
    min-width: 38px;
    text-align: center;
    color: #E0BB74;
    font-size: 10px;
}
.m2o-map-hint {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 9;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(16, 14, 11, 0.75);
    color: #6F6350;
    font-size: 10px;
    pointer-events: none;
}
.m2o-map-sidebar {
    min-height: 0;
    border: 1px solid #3A3124;
    border-radius: 10px;
    background: linear-gradient(160deg, #1D1813 0%, #14110D 100%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 78vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.m2o-map-search {
    height: 32px;
    border: 1px solid #3A3124;
    border-radius: 6px;
    background: #1D1913;
    color: #E8DCC4;
    padding: 0 8px;
    font-size: 12px;
    outline: none;
}
.m2o-map-search:focus {
    border-color: #C9A25A;
}
.m2o-map-layers-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #9C8F78;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.m2o-map-layers-title button {
    height: 20px;
    padding: 0 6px;
    border: 1px solid #3A3124;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    color: #E8DCC4;
    font-size: 9px;
    cursor: pointer;
}
.m2o-map-admin-hint {
    padding: 6px 8px;
    border-left: 2px solid rgba(201, 162, 90, 0.45);
    background: rgba(201, 162, 90, 0.06);
    color: #9C8F78;
    font-size: 10px;
    line-height: 1.45;
}
.m2o-map-types {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 4px;
    min-height: 0;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 3px;
}
.m2o-map-chip {
    flex: 0 0 auto;
    border: 1px solid #3A3124;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.03);
    color: #9C8F78;
    padding: 4px 7px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.m2o-map-chip.on {
    color: #E0BB74;
    border-color: rgba(201, 162, 90, 0.55);
    background: rgba(201, 162, 90, 0.08);
}
.m2o-map-chip:hover {
    border-color: rgba(201, 162, 90, 0.55);
    color: #E8DCC4;
}
.m2o-map-legend {
    flex: 1 1 auto;
    min-height: 80px;
    overflow-y: auto;
    border-top: 1px solid rgba(201, 162, 90, 0.15);
    padding-top: 6px;
}
.m2o-map-legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    font-size: 10px;
    cursor: pointer;
    border-bottom: 1px dashed rgba(201, 162, 90, 0.1);
}
.m2o-map-legend-row:hover {
    background: rgba(255, 255, 255, 0.03);
}
.m2o-map-legend-empty {
    padding: 10px 2px;
    color: #6F6350;
    font-size: 10px;
    line-height: 1.5;
}
.m2o-map-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.m2o-map-legend-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.m2o-map-legend-type {
    color: #6F6350;
    font-size: 8px;
    font-family: Consolas, monospace;
}
.m2o-map-details {
    flex: 0 0 auto;
    max-height: 180px;
    overflow-y: auto;
    border-top: 1px solid #3A3124;
    padding-top: 8px;
}
.m2o-map-details h4 {
    margin: 0 0 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    font-size: 14px;
    color: #E0BB74;
}
.m2o-map-details-meta {
    color: #9C8F78;
    font-size: 10px;
    line-height: 1.5;
}
.m2o-map-details-empty {
    color: #6F6350;
    font-size: 11px;
}
.m2o-map-count {
    color: #6F6350;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.m2o-map-sidebar,
.m2o-map-types,
.m2o-map-legend,
.m2o-map-details {
    scrollbar-width: thin;
    scrollbar-color: #5A4A33 transparent;
}
.m2o-map-sidebar::-webkit-scrollbar,
.m2o-map-types::-webkit-scrollbar,
.m2o-map-legend::-webkit-scrollbar,
.m2o-map-details::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.m2o-map-sidebar::-webkit-scrollbar-track,
.m2o-map-types::-webkit-scrollbar-track,
.m2o-map-legend::-webkit-scrollbar-track,
.m2o-map-details::-webkit-scrollbar-track {
    background: transparent;
}
.m2o-map-sidebar::-webkit-scrollbar-thumb,
.m2o-map-types::-webkit-scrollbar-thumb,
.m2o-map-legend::-webkit-scrollbar-thumb,
.m2o-map-details::-webkit-scrollbar-thumb {
    background: #5A4A33;
    border-radius: 3px;
}
@media (max-width: 900px) {
    .m2o-map-layout {
        grid-template-columns: 1fr;
    }
    .m2o-map-sidebar {
        max-height: none;
    }
    .m2o-map-wrap {
        max-height: 70vh;
    }
}
