#maps_page .maps-zone {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

#maps_page .maps-zone:first-child {
    border-top: 0;
    padding-top: 0;
}

#maps_page .maps-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

#maps_page .maps-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

#maps_page .maps-legend-box {
    width: 14px;
    height: 14px;
    border-radius: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-block;
}

#maps_page .maps-grid-table {
    width: auto;
    margin-bottom: 0;
    background: transparent;
    border-collapse: separate;
    border-spacing: 0;
}

#maps_page .maps-grid-table td {
    width: 32px;
    height: 32px;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

#maps_page .maps-grid-cell {
    font-size: 0.72rem;
    font-weight: 700;
    position: relative;
    overflow: visible;
}

#maps_page .maps-grid-cell.maps-merge-left {
    border-left-color: transparent;
}

#maps_page .maps-grid-cell.maps-merge-right {
    border-right-color: transparent;
}

#maps_page .maps-grid-cell.maps-merge-top {
    border-top-color: transparent;
}

#maps_page .maps-grid-cell.maps-merge-bottom {
    border-bottom-color: transparent;
}

#maps_page .maps-grid-box-empty {
    background: rgba(255, 255, 255, 0.03);
}

#maps_page .maps-grid-box-available {
    background: rgba(25, 135, 84, 0.35);
}

#maps_page .maps-grid-box-owned {
    background: rgba(13, 110, 253, 0.28);
}

#maps_page .maps-grid-box-region {
    background: rgba(111, 66, 193, 0.4);
}

#maps_page .maps-grid-box-inactive-free {
    background: rgba(255, 193, 7, 0.2);
}

#maps_page .maps-grid-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 30px;
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

#maps_page .maps-grid-link:hover {
    text-decoration: none;
    color: inherit;
}

#maps_page .maps-grid-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 6px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#maps_page .maps-grid-title-overlay-horizontal {
    writing-mode: horizontal-tb;
}

#maps_page .maps-grid-title-overlay-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 1;
    padding: 4px 2px;
    font-size: 0.68rem;
}

#maps_page .maps-inline-color {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    vertical-align: -1px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#maps_page .maps-color-input {
    min-width: 44px;
    padding: 0.2rem;
}

#maps_page .maps-search-panel {
    background: rgba(255, 255, 255, 0.02);
}

#maps_page .maps-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#maps_page .maps-search-summary {
    font-size: 0.92rem;
}

#maps_page .maps-zone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

#maps_page .maps-regions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#maps_page .maps-region-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
