.spray-map-page {
    min-height: auto;
    padding: 110px 12px 28px;
}

.map-toolbar {
    max-width: 1320px;
    display: grid;
    gap: 14px;
    margin: 0 auto 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(8, 14, 16, 0.9), rgba(5, 8, 9, 0.82));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.map-toolbar-info {
    min-width: 0;
}

.map-toolbar span,
.panel-head span {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.map-toolbar h1 {
    margin: 5px 0;
    color: white;
    font-size: 30px;
    font-weight: 900;
}

.map-toolbar p,
.panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.map-meta-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-top: 14px;
}

.map-meta-row div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(159, 252, 255, 0.12);
    border-radius: 17px;
    background: rgba(159, 252, 255, 0.04);
}

.map-meta-row b {
    display: block;
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.map-meta-row small {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-toolbar-actions {
    display: grid;
    gap: 8px;
}


.map-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.map-control-grid .map-close-button {
    grid-column: 1 / -1;
}

.map-control-grid button {
    min-height: 42px;
}

.map-style-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.map-toolbar-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.map-toolbar-actions button {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--silver);
    background: rgba(159, 252, 255, 0.06);
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: 0.18s ease;
}

.map-toolbar-actions button:hover {
    transform: translateY(-1px);
    border-color: rgba(159, 252, 255, 0.35);
    background: rgba(159, 252, 255, 0.1);
}

.map-style-button.active {
    color: #001315;
    border-color: rgba(159, 252, 255, 0.52);
    background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
    box-shadow: 0 0 26px rgba(159, 252, 255, 0.16);
}

.map-mini-help {
    padding: 11px 12px;
    border: 1px solid rgba(159, 252, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.map-mini-help span {
    display: block;
    margin-bottom: 4px;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
}

.map-mini-help p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.7;
}

.map-shell {
    max-width: 1320px;
    height: calc(100dvh - 250px);
    min-height: 570px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(5, 8, 9, 0.8);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

#gtaMap {
    width: 100%;
    height: 100%;
    background: #1a3a4a;
}

.leaflet-container {
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    background: #1a3a4a;
}

.leaflet-tile {
    image-rendering: auto;
}

.leaflet-occupation-pane {
    z-index: 465;
    pointer-events: auto;
}

.leaflet-occupation-pane svg {
    overflow: visible;
}

.leaflet-occupation-pane path {
    vector-effect: non-scaling-stroke;
    cursor: pointer;
}


.leaflet-control-zoom {
    border: 0 !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32) !important;
}

.leaflet-control-zoom a {
    border: 1px solid rgba(159, 252, 255, 0.16) !important;
    color: white !important;
    background: rgba(5, 8, 9, 0.9) !important;
    backdrop-filter: blur(12px);
}

.leaflet-control-zoom a:hover {
    color: #001315 !important;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-2)) !important;
}

.map-details-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 700;
    max-height: 72%;
    overflow-y: auto;
    display: none;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: rgba(5, 8, 9, 0.93);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.map-details-panel.show {
    display: block;
    animation: mapPanelIn 0.18s ease both;
}

@keyframes mapPanelIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-empty {
    display: grid;
    gap: 6px;
    text-align: center;
    color: var(--muted);
}

.panel-empty b {
    color: white;
    font-size: 18px;
}

.panel-head h2 {
    margin: 5px 0;
    color: white;
    font-size: 24px;
    font-weight: 900;
}

.marker-panel-head {
    border-inline-start: 4px solid var(--marker-color, var(--cyan));
    padding-inline-start: 12px;
}

.marker-panel-head span {
    color: var(--marker-color, var(--cyan));
}

.cell-preview {
    height: 230px;
    overflow: hidden;
    margin: 14px 0;
    border: 1px solid rgba(159, 252, 255, 0.16);
    border-radius: 22px;
    background: #1a3a4a;
}

.coords-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0;
    padding: 13px;
    border: 1px solid rgba(159, 252, 255, 0.16);
    border-radius: 18px;
    background: rgba(159, 252, 255, 0.045);
}

.coords-box b {
    display: block;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.coords-box span {
    display: block;
    margin-top: 5px;
    direction: ltr;
    color: white;
    font-size: 13px;
    font-weight: 900;
}

.coords-box button {
    min-width: 70px;
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: #001315;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.panel-field {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}

.panel-field label {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.panel-field select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    outline: none;
    color: white;
    background: rgba(8, 14, 16, 0.9);
    font-family: inherit;
    font-weight: 900;
}

.map-action {
    width: 100%;
    min-height: 50px;
    margin-top: 14px;
    border: 0;
    border-radius: 17px;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: 0.16s ease;
}

.map-action:hover:not(:disabled) {
    transform: translateY(-1px);
}

.map-action.primary {
    color: #001315;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
}

.map-action.danger {
    color: white;
    border: 1px solid rgba(255, 115, 115, 0.35);
    background: rgba(255, 80, 80, 0.18);
}

.map-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.map-message {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 13px;
    text-align: center;
}

.owner-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--owner-color) 45%, transparent);
    border-radius: 22px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--owner-color) 18%, transparent), rgba(255, 255, 255, 0.03));
}

.owner-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 16px;
    color: #001315;
    background: var(--owner-color);
    font-weight: 900;
    box-shadow: 0 0 24px color-mix(in srgb, var(--owner-color) 22%, transparent);
}

.owner-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.owner-icon i {
    font-style: normal;
}

.owner-box b {
    display: block;
    color: white;
    font-size: 17px;
    font-weight: 900;
}

.owner-box span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.marker-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.marker-image-card {
    display: grid;
    gap: 7px;
    color: white;
    text-decoration: none;
}

.marker-image-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(159, 252, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.marker-image-card span {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.info-list {
    display: grid;
    gap: 10px;
}

.info-list div {
    padding: 13px;
    border: 1px solid rgba(159, 252, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.info-list b {
    display: block;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.info-list span {
    display: block;
    margin-top: 5px;
    color: white;
    line-height: 1.7;
    font-size: 13px;
}

.empty-cell {
    transition: 0.12s ease;
    stroke-opacity: 1;
    stroke-width: 1.4px;
}

.empty-cell:hover {
    fill-opacity: 0.14;
    stroke-opacity: 1;
}

.occupied-cell {
    transition: 0.12s ease;
    stroke-width: 1.8px;
}

.occupied-cell:hover {
    fill-opacity: 0.9;
}

.map-loading {
    position: absolute;
    inset: 0;
    z-index: 650;
    display: grid;
    place-items: center;
    padding: 18px;
    color: white;
    background:
        radial-gradient(circle at center, rgba(159, 252, 255, 0.1), transparent 38%),
        rgba(5, 8, 9, 0.74);
    backdrop-filter: blur(8px);
    transition: 0.24s ease;
}

.map-loading.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.map-loading div {
    width: min(360px, 92%);
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid rgba(159, 252, 255, 0.18);
    border-radius: 24px;
    text-align: center;
    background: rgba(5, 8, 9, 0.82);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.map-loading div::before {
    content: "";
    width: 44px;
    height: 44px;
    margin: 0 auto 6px;
    border: 3px solid rgba(159, 252, 255, 0.16);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: mapSpin 0.8s linear infinite;
}

.map-loading b {
    font-size: 17px;
    font-weight: 900;
}

.map-loading span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.8;
}

@keyframes mapSpin {
    to {
        transform: rotate(360deg);
    }
}

.map-toast {
    position: absolute;
    top: 14px;
    left: 50%;
    z-index: 850;
    max-width: min(520px, calc(100% - 28px));
    padding: 12px 16px;
    border: 1px solid rgba(159, 252, 255, 0.18);
    border-radius: 18px;
    color: white;
    background: rgba(5, 8, 9, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: 0.22s ease;
}

.map-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.map-toast.success {
    border-color: rgba(100, 255, 180, 0.28);
    background: rgba(9, 70, 45, 0.9);
}

.map-toast.error {
    border-color: rgba(255, 100, 100, 0.32);
    background: rgba(80, 20, 20, 0.92);
}

.map-toast.info {
    border-color: rgba(159, 252, 255, 0.22);
}

.map-corner-hint {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 500;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid rgba(159, 252, 255, 0.13);
    border-radius: 16px;
    color: white;
    background: rgba(5, 8, 9, 0.72);
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.map-corner-hint b {
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.map-corner-hint span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

body.map-fullscreen-page {
    overflow-y: auto !important;
}


@media (min-width: 900px) {
    .map-toolbar {
        grid-template-columns: 1fr 430px;
        align-items: center;
    }

    .map-details-panel {
        top: 12px;
        right: auto;
        bottom: 12px;
        left: 12px;
        width: 410px;
        max-height: none;
    }

    .map-shell {
        height: calc(100dvh - 245px);
    }
}

@media (max-width: 720px) {
    .map-meta-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .spray-map-page {
        padding: 96px 8px 24px;
    }

    .map-toolbar {
        border-radius: 20px;
        padding: 12px;
    }

    .map-toolbar h1 {
        font-size: 24px;
    }

    .map-style-switch,
    .map-toolbar-buttons {
        grid-template-columns: 1fr;
    }

    .map-shell {
        min-height: 540px;
        height: calc(100dvh - 230px);
        border-radius: 22px;
    }

    .map-details-panel {
        left: 8px;
        right: 8px;
        bottom: 8px;
        max-height: 76%;
        border-radius: 22px;
    }

    .cell-preview {
        height: 190px;
    }

    .map-corner-hint {
        display: none;
    }

    .map-toast {
        top: 10px;
    }
}

.map-grid-overlay {
    position: absolute;
    inset: auto;
    z-index: 620;
    display: grid;
    grid-template-columns: repeat(var(--map-grid-cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--map-grid-rows), minmax(0, 1fr));
    pointer-events: none;
    overflow: hidden;
    contain: layout paint style;
    opacity: 1;
    background-image:
        linear-gradient(to right, rgba(55, 145, 255, .82) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(55, 145, 255, .76) 1px, transparent 1px);
    background-size:
        calc(100% / var(--map-grid-cols)) calc(100% / var(--map-grid-rows)),
        calc(100% / var(--map-grid-cols)) calc(100% / var(--map-grid-rows));
    outline: 2px solid rgba(55, 145, 255, .88);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 0 28px rgba(0, 0, 0, .18);
}

.map-grid-overlay.is-hidden {
    display: none;
}

.map-grid-cell {
    min-width: 0;
    min-height: 0;
    background: rgba(55, 145, 255, .025);
    box-shadow: inset 0 0 0 1px rgba(2, 16, 22, .18);
}

.map-grid-cell.is-occupied {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--owner-color), transparent 22%), rgba(255, 255, 255, .04));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--owner-color), #fff 30%),
        inset 0 0 18px color-mix(in srgb, var(--owner-color), transparent 58%),
        0 0 16px color-mix(in srgb, var(--owner-color), transparent 70%);
}

.map-cell-hover {
    position: absolute;
    z-index: 880;
    padding: 7px 10px;
    border: 1px solid rgba(55, 145, 255, .32);
    border-radius: 11px;
    color: #061014;
    background: rgba(238, 252, 255, .96);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
    font-size: 12px;
    font-weight: 900;
    pointer-events: none;
    white-space: nowrap;
}

.map-cell-hover[hidden] {
    display: none;
}

@media (max-width: 820px), (pointer: coarse) {
    .map-grid-overlay {
        z-index: 760;
        background-image:
            linear-gradient(to right, rgba(55, 145, 255, .92) 2px, transparent 2px),
            linear-gradient(to bottom, rgba(55, 145, 255, .86) 2px, transparent 2px);
        outline: 3px solid rgba(55, 145, 255, .92);
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, .28),
            inset 0 0 18px rgba(55, 145, 255, .08),
            0 0 30px rgba(0, 0, 0, .28);
    }

    .map-grid-cell {
        box-sizing: border-box;
        border: 1px solid rgba(55, 145, 255, .5);
        background: rgba(55, 145, 255, .04);
        box-shadow: inset 0 0 0 1px rgba(0, 12, 18, .22);
    }

    .map-grid-cell.is-occupied {
        border-color: var(--owner-color);
        background-color: var(--owner-color);
        background:
            linear-gradient(135deg,
                color-mix(in srgb, var(--owner-color), transparent 24%),
                rgba(255, 255, 255, .08));
        box-shadow:
            inset 0 0 0 2px var(--owner-color),
            inset 0 0 22px color-mix(in srgb, var(--owner-color), transparent 50%),
            0 0 18px color-mix(in srgb, var(--owner-color), transparent 65%);
    }

    .map-grid-cell.is-empty {
        background-color: rgba(55, 145, 255, .035);
    }

    .map-cell-hover {
        z-index: 920;
        padding: 8px 11px;
        border-width: 2px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .map-grid-overlay {
        background-image:
            linear-gradient(to right, rgba(55, 145, 255, .98) 2.5px, transparent 2.5px),
            linear-gradient(to bottom, rgba(55, 145, 255, .92) 2.5px, transparent 2.5px);
        outline-width: 3px;
    }

    .map-grid-cell {
        border-color: rgba(55, 145, 255, .62);
    }
}

.map-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.map-search-row input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    background: rgba(255,255,255,.055);
    outline: none;
}
.map-filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.map-filter-row button.active { color: #001315; border-color: transparent; background: linear-gradient(135deg, var(--cyan), var(--cyan-2)); }
.map-legend {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 610;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-width: min(560px, calc(100% - 24px));
    pointer-events: none;
}
.map-legend span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(5,8,9,.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 900;
}
.map-legend i { width: 10px; height: 10px; border-radius: 999px; background: var(--legend-color); box-shadow: 0 0 14px var(--legend-color); }
.map-legend .is-empty { color: var(--muted); }
.map-grid-overlay[data-filter="occupied"] .map-grid-cell.is-empty { opacity: .10; }
.map-grid-overlay[data-filter="free"] .map-grid-cell.is-occupied { opacity: .18; filter: grayscale(.45); }
.map-grid-overlay.grid-hidden {
    background-image: none;
    outline-color: transparent;
    box-shadow: none;
}
.map-grid-overlay.grid-hidden .map-grid-cell.is-empty { border-color: transparent; box-shadow: none; background: transparent; }
@media (max-width: 720px) {
    .map-search-row, .map-filter-row { grid-template-columns: 1fr; }
    .map-legend { right: 8px; left: 8px; bottom: 8px; }
    .map-legend span { font-size: 11px; }
}

.map-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 8px;
}
.map-search-row input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    background: rgba(255,255,255,.055);
    outline: none;
}
.map-search-row button {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--soft);
    background: rgba(255,255,255,.055);
    font-weight: 900;
}
.map-filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.map-filter-row button.active { color: #001315; border-color: transparent; background: linear-gradient(135deg, var(--cyan), var(--cyan-2)); }
.map-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.map-control-grid .map-close-button { grid-column: auto; }

.map-shell { isolation: isolate; }
#gtaMap { position: relative; z-index: 1; }
.map-grid-overlay {
    position: absolute;
    inset: auto;
    z-index: 900;
    display: grid;
    grid-template-columns: repeat(var(--map-grid-cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--map-grid-rows), minmax(0, 1fr));
    pointer-events: none;
    overflow: hidden;
    contain: layout paint style;
    opacity: 1;
    background-image:
        linear-gradient(to right, rgba(72, 240, 255, .96) 2px, transparent 2px),
        linear-gradient(to bottom, rgba(72, 240, 255, .90) 2px, transparent 2px);
    background-size:
        calc(100% / var(--map-grid-cols)) calc(100% / var(--map-grid-rows)),
        calc(100% / var(--map-grid-cols)) calc(100% / var(--map-grid-rows));
    outline: 3px solid rgba(72, 240, 255, .92);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .34),
        inset 0 0 28px rgba(72, 240, 255, .10),
        0 0 36px rgba(0, 0, 0, .30);
}
.map-grid-overlay.is-hidden { display: none; }
.map-grid-overlay.grid-hidden { display: grid; background-image: inherit; outline-color: rgba(72, 240, 255, .92); box-shadow: inherit; }
.map-grid-cell {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    border: 1px solid rgba(72, 240, 255, .50);
    background: rgba(72, 240, 255, .045);
    box-shadow: inset 0 0 0 1px rgba(0, 13, 24, .18);
}
.map-grid-cell.is-empty {
    background: rgba(72, 240, 255, .04);
}
.map-grid-cell.is-occupied {
    border-color: var(--owner-color);
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--owner-color), transparent 20%),
            rgba(255, 255, 255, .10));
    box-shadow:
        inset 0 0 0 2px color-mix(in srgb, var(--owner-color), #fff 20%),
        inset 0 0 24px color-mix(in srgb, var(--owner-color), transparent 48%),
        0 0 18px color-mix(in srgb, var(--owner-color), transparent 62%);
}
.map-grid-overlay[data-filter="occupied"] .map-grid-cell.is-empty { opacity: .12; }
.map-grid-overlay[data-filter="free"] .map-grid-cell.is-occupied { opacity: .16; filter: grayscale(.55); }

@media (max-width: 820px), (pointer: coarse) {
    .map-grid-overlay {
        z-index: 980;
        background-image:
            linear-gradient(to right, rgba(72, 240, 255, 1) 2.5px, transparent 2.5px),
            linear-gradient(to bottom, rgba(72, 240, 255, .96) 2.5px, transparent 2.5px);
        outline-width: 4px;
    }
    .map-grid-cell {
        border: 1.5px solid rgba(72, 240, 255, .72);
        background: rgba(72, 240, 255, .07);
    }
    .map-grid-cell.is-occupied {
        border-width: 2px;
        box-shadow:
            inset 0 0 0 2px color-mix(in srgb, var(--owner-color), #fff 18%),
            inset 0 0 26px color-mix(in srgb, var(--owner-color), transparent 42%),
            0 0 22px color-mix(in srgb, var(--owner-color), transparent 56%);
    }
}

@media (max-width: 720px) {
    .map-search-row { grid-template-columns: minmax(0, 1fr) 76px; }
    .map-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .map-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.map-search-box {
    min-height: 42px;
    position: relative;
    display: block;
}
.map-search-box input {
    width: 100%;
    height: 100%;
    min-height: 42px;
    padding: 0 16px 0 58px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    background: rgba(255, 255, 255, .055);
    font-family: inherit;
    font-weight: 900;
    outline: none;
}
.map-search-box input:focus {
    border-color: rgba(159, 252, 255, .42);
    box-shadow: 0 0 0 3px rgba(55, 145, 255, .08);
}
.map-search-clear {
    width: auto;
    min-width: 44px;
    min-height: 30px;
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 10px;
    border-radius: 11px;
    font-size: 12px;
}
.map-search-clear[hidden] { display: none; }
.map-control-grid .map-close-button { grid-column: auto; }
.map-filter-row,
.map-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.map-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty-cell,
.occupied-cell { cursor: pointer; }
@media (max-width: 620px) {
    .map-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .map-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


.leaflet-container {
    position: relative;
    overflow: hidden;
}

#gtaMap .map-grid-overlay {
    position: absolute;
    z-index: 440;
    display: grid;
    grid-template-columns: repeat(var(--map-grid-cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--map-grid-rows), minmax(0, 1fr));
    pointer-events: none;
    overflow: hidden;
    box-sizing: border-box;
    background-image:
        linear-gradient(to right, rgba(0, 247, 255, .88) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 247, 255, .86) 1px, transparent 1px);
    background-size:
        calc(100% / var(--map-grid-cols)) calc(100% / var(--map-grid-rows)),
        calc(100% / var(--map-grid-cols)) calc(100% / var(--map-grid-rows));
    outline: 1px solid rgba(0, 247, 255, .90);
    box-shadow: none;
}

#gtaMap .map-grid-cell {
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: 0;
    appearance: none;
    pointer-events: auto;
    cursor: pointer;
    color: transparent;
    background: transparent;
    box-shadow: none;
}

#gtaMap .map-grid-cell:hover,
#gtaMap .map-grid-cell:focus-visible {
    background: rgba(0, 247, 255, .12);
    outline: 1px solid rgba(255, 255, 255, .62);
    outline-offset: -1px;
}

#gtaMap .map-grid-cell.is-occupied {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--owner-color), transparent 24%),
            color-mix(in srgb, var(--owner-color), transparent 42%));
    box-shadow:
        inset 0 0 0 1.5px color-mix(in srgb, var(--owner-color), #101820 38%);
}

#gtaMap .map-grid-overlay[data-filter="occupied"] .map-grid-cell.is-empty {
    opacity: .16;
}

#gtaMap .map-grid-overlay[data-filter="free"] .map-grid-cell.is-occupied {
    opacity: .20;
    filter: grayscale(.45);
}

#gtaMap .leaflet-control-container {
    position: relative;
    z-index: 1100;
}

#gtaMap .leaflet-control-zoom {
    position: relative;
    z-index: 1101;
}

#gtaMap .leaflet-control-zoom a {
    background: rgba(5, 8, 9, .98) !important;
}

@media (max-width: 820px), (pointer: coarse) {
    #gtaMap .map-grid-overlay {
        z-index: 440;
        background-image:
            linear-gradient(to right, rgba(0, 247, 255, .90) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(0, 247, 255, .88) 1px, transparent 1px);
        outline-width: 1px;
        outline-color: rgba(0, 247, 255, .90);
        box-shadow: none;
    }

    #gtaMap .map-grid-cell:hover,
    #gtaMap .map-grid-cell:focus-visible {
        background: rgba(0, 247, 255, .12);
    }

    #gtaMap .map-grid-cell.is-occupied {
        background:
            linear-gradient(135deg,
                color-mix(in srgb, var(--owner-color), transparent 24%),
                color-mix(in srgb, var(--owner-color), transparent 42%));
        box-shadow:
            inset 0 0 0 1.5px color-mix(in srgb, var(--owner-color), #101820 38%);
    }
}

.map-legend { display: none; }

.map-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.map-quick-links a,
.manager-open-map,
.manager-map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(159, 252, 255, .18);
    border-radius: 14px;
    color: var(--cyan);
    background: rgba(159, 252, 255, .06);
    font-weight: 900;
    text-decoration: none;
}

.cost-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(159, 252, 255, .12);
    border-radius: 16px;
    background: rgba(159, 252, 255, .05);
}

.cost-note b { color: #fff; }
.cost-note span { color: var(--cyan); font-weight: 900; }

.map-action.ghost {
    border-color: rgba(255,255,255,.12);
    color: #fff;
    background: rgba(255,255,255,.05);
}

.modal-lock {
    overflow: hidden !important;
}

.quick-buy-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(12px);
}

.quick-buy-modal[hidden] { display: none; }

.quick-buy-card {
    width: min(560px, 100%);
    padding: 24px;
    border: 1px solid rgba(159,252,255,.18);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(8,14,16,.98), rgba(5,8,9,.94));
    box-shadow: 0 28px 90px rgba(0,0,0,.52);
    text-align: center;
}

.quick-buy-card > span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.quick-buy-card h2 {
    margin: 8px 0 10px;
    color: #fff;
    font-size: 28px;
    font-weight: 900;
}

.quick-buy-card p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.8;
}

.quick-buy-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0;
}

.quick-buy-stats div {
    padding: 12px;
    border: 1px solid rgba(159,252,255,.12);
    border-radius: 16px;
    background: rgba(159,252,255,.04);
}

.quick-buy-stats b,
.quick-buy-stats strong {
    display: block;
}

.quick-buy-stats b {
    color: var(--muted);
    font-size: 12px;
}

.quick-buy-stats strong {
    margin-top: 5px;
    color: #fff;
    font-size: 22px;
}

.quick-buy-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.map-manager-page-shell {
    width: min(1280px, calc(100% - 24px));
    margin: 0 auto;
    padding: 112px 0 36px;
}

.manager-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(8,14,16,.92), rgba(5,8,9,.84));
    box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.manager-hero span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.manager-hero h1 {
    margin: 7px 0;
    color: #fff;
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 900;
}

.manager-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.manager-faction-card {
    padding: 18px;
    border: 1px solid rgba(159,252,255,.14);
    border-radius: 24px;
    background: rgba(255,255,255,.035);
    box-shadow: 0 18px 60px rgba(0,0,0,.22);
}

.manager-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.manager-card-head > span {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: var(--owner-color);
    box-shadow: 0 0 28px color-mix(in srgb, var(--owner-color), transparent 70%);
}

.manager-card-head b,
.manager-card-head small {
    display: block;
}

.manager-card-head b { color: #fff; font-size: 18px; font-weight: 900; }
.manager-card-head small { color: var(--muted); margin-top: 3px; }

.manager-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.manager-stats div {
    padding: 11px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 15px;
    background: rgba(0,0,0,.18);
}

.manager-stats em,
.manager-stats strong {
    display: block;
    font-style: normal;
}

.manager-stats em { color: var(--muted); font-size: 12px; }
.manager-stats strong { color: #fff; margin-top: 5px; font-size: 22px; font-weight: 900; }

.manager-buy-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    margin-top: 14px;
}

.manager-buy-row input,
.manager-buy-row button {
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: #fff;
    background: rgba(255,255,255,.055);
    font: inherit;
    font-weight: 900;
}

.manager-buy-row input { padding: 0 12px; direction: ltr; text-align: center; }
.manager-buy-row button { color: #001315; background: linear-gradient(135deg, var(--cyan), var(--cyan-2)); cursor: pointer; }

.manager-note {
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.manager-toast {
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 22px;
    transform: translate(-50%, 20px);
    opacity: 0;
    padding: 12px 16px;
    border: 1px solid rgba(159,252,255,.18);
    border-radius: 16px;
    color: #fff;
    background: rgba(5,8,9,.94);
    box-shadow: 0 18px 50px rgba(0,0,0,.38);
    transition: .18s ease;
}

.manager-toast.show { opacity: 1; transform: translate(-50%, 0); }
.manager-toast.error { border-color: rgba(255,90,122,.45); color: #ffb8c5; }

@media (max-width: 700px) {
    .manager-hero { display: grid; }
    .quick-buy-actions,
    .quick-buy-stats { grid-template-columns: 1fr; }
    .manager-buy-row { grid-template-columns: 1fr; }
}


#gtaMap .map-grid-overlay {
    background-image:
        linear-gradient(to right, rgba(0, 247, 255, .88) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 247, 255, .86) 1px, transparent 1px);
    outline-color: rgba(0, 247, 255, .90);
    box-shadow: none;
}

#gtaMap .map-grid-cell:hover,
#gtaMap .map-grid-cell:focus-visible {
    background: rgba(0, 247, 255, .12);
    outline-color: rgba(255, 255, 255, .70);
}

@media (max-width: 820px), (pointer: coarse) {
    #gtaMap .map-grid-overlay {
        background-image:
            linear-gradient(to right, rgba(0, 247, 255, .92) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(0, 247, 255, .90) 1px, transparent 1px);
        outline-color: rgba(0, 247, 255, .92);
    }
}

.quick-buy-modal {
    align-items: center;
    justify-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}

.quick-buy-card {
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.quick-buy-actions {
    position: sticky;
    bottom: -1px;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(8, 14, 16, 0), rgba(8, 14, 16, .98) 26%);
}

@media (max-width: 620px) {
    .quick-buy-card {
        width: min(520px, 100%);
        max-height: calc(100dvh - 24px);
        padding: 18px;
        border-radius: 22px;
    }

    .quick-buy-card h2 {
        font-size: 22px;
    }
}


.map-quick-links[hidden],
#mapManagersLink[hidden] {
    display: none !important;
}

.spray-map-page .map-grid-overlay {
    background-image:
        linear-gradient(to right, rgba(0, 247, 255, .86) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 247, 255, .80) 1px, transparent 1px) !important;
    outline: 2px solid rgba(0, 247, 255, .90) !important;
}

.spray-map-page .map-grid-cell {
    border-color: rgba(0, 247, 255, .45) !important;
}

@media (max-width: 820px), (pointer: coarse) {
    .spray-map-page .map-grid-overlay {
        background-image:
            linear-gradient(to right, rgba(0, 247, 255, .92) 1.5px, transparent 1.5px),
            linear-gradient(to bottom, rgba(0, 247, 255, .86) 1.5px, transparent 1.5px) !important;
        outline: 2px solid rgba(0, 247, 255, .94) !important;
    }

    .spray-map-page .map-grid-cell {
        border-color: rgba(0, 247, 255, .58) !important;
    }
}


.spray-map-page #gtaMap .map-grid-overlay {
    background-image:
        linear-gradient(to right, rgba(0, 247, 255, .88) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 247, 255, .86) 1px, transparent 1px) !important;
    outline-color: rgb(0, 247, 255) !important;
}

.spray-map-page #gtaMap .map-grid-cell {
    border-color: rgba(0, 247, 255, .45) !important;
}

@media (max-width: 820px), (pointer: coarse) {
    .spray-map-page #gtaMap .map-grid-overlay {
        background-image:
            linear-gradient(to right, rgba(0, 247, 255, .92) 1.5px, transparent 1.5px),
            linear-gradient(to bottom, rgba(0, 247, 255, .88) 1.5px, transparent 1.5px) !important;
        outline-color: rgb(0, 247, 255) !important;
    }

    .spray-map-page #gtaMap .map-grid-cell {
        border-color: rgba(0, 247, 255, .58) !important;
    }
}


/* v2001 global FBI navy skin */
:root {
    --fbi-navy-0: #020912;
    --fbi-navy-1: #04101d;
    --fbi-navy-2: #061727;
    --fbi-navy-3: #0a2137;
    --fbi-line-navy: rgba(48, 72, 99, .48);
    --fbi-line-soft: rgba(66, 92, 121, .34);
    --fbi-text-white: #f4f7fb;
    --fbi-muted-blue: #9badbf;
    --fbi-green: #20ff58;
    --fbi-discord: #5865F2;
    --fbi-sand-1: #dec08a;
    --fbi-sand-2: #c59c60;
    --fbi-gold-1: #ffd76a;
    --fbi-gold-2: #d79a2b;
    --fbi-red: #ff233d;
}
html,
body {
    background: radial-gradient(circle at 20% 0%, rgba(28, 53, 86, .26), transparent 34%), linear-gradient(180deg, var(--fbi-navy-1) 0%, var(--fbi-navy-2) 48%, var(--fbi-navy-0) 100%) !important;
    color: var(--fbi-text-white) !important;
}
body::before,
.site-bg,
.glow,
.neon,
.page-glow,
.background-glow,
.home-glow,
.dashboard-glow {
    box-shadow: none !important;
    text-shadow: none !important;
}
.site-header {
    background: linear-gradient(180deg, rgba(4,16,29,.58), rgba(4,16,29,.22)) !important;
    border-color: rgba(48,72,99,.34) !important;
    border-bottom-color: rgba(48,72,99,.42) !important;
    box-shadow: none !important;
}
.site-header .brand,
.brand {
    transform: translate(calc(-50% - 5px), -50%) !important;
}
.site-header .brand-text strong,
.brand-text strong,
.site-header .header-appearance-button,
.site-header .menu-button {
    color: var(--fbi-text-white) !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    text-shadow: none !important;
}
.site-header .menu-button span,
.menu-button span {
    background: var(--fbi-text-white) !important;
    box-shadow: none !important;
}
.site-footer {
    position: relative;
    background: rgba(2,9,18,.72) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(var(--container, 1180px), calc(100vw - 32px));
    height: 1px;
    transform: translateX(-50%);
    background: rgba(255,255,255,.58) !important;
    box-shadow: none !important;
}
.portal-hero,
.member-home-card,
.portal-live-panel,
.portal-service,
.home-dashboard-bot,
.dashboard-card,
.dashboard-panel,
.dashboard-section,
.bot-server-card,
.dash-card,
.setting-card,
.config-card,
.membership-card,
.rules-card,
.rule-card,
.info-card,
.privacy-card,
.legal-card,
.update-card,
.page-card,
.content-card,
.identity-card,
.auth-card,
.map-panel,
.map-card,
.table-card,
.modal-content,
.modal-panel,
.modal-card,
section[class*="card"],
div[class*="card"] {
    background: linear-gradient(145deg, rgba(5,18,32,.92), rgba(2,9,18,.90)) !important;
    border-color: var(--fbi-line-navy) !important;
    color: var(--fbi-text-white) !important;
    box-shadow: none !important;
}
.portal-stat,
.stat-card,
.dashboard-stat,
.metric-card,
.portal-service,
.rules-item,
.info-link,
.panel-row,
.settings-row,
.table-row,
.list-row,
.resource-row,
.permission-row,
.form-row,
.input-card {
    background: rgba(5,18,32,.72) !important;
    border-color: rgba(48,72,99,.44) !important;
    color: var(--fbi-text-white) !important;
    box-shadow: none !important;
}
.portal-kicker,
.badge,
.status-badge,
.server-status-badge,
.home-dashboard-info span,
.tag,
.pill,
.chip {
    color: var(--fbi-text-white) !important;
    background: rgba(244,247,251,.055) !important;
    border-color: var(--fbi-line-soft) !important;
    box-shadow: none !important;
}
button,
.button,
.btn,
.portal-btn,
.action-btn,
.primary-button,
a[class*="button"],
a[class*="btn"] {
    box-shadow: none !important;
}
.portal-btn-green,
a.portal-btn.portal-btn-green,
.member-actions a.member-action-rules,
a[href="/rules"].portal-btn,
a[href="/rules"].member-action-rules {
    color: #03140a !important;
    background: var(--fbi-green) !important;
    border-color: var(--fbi-green) !important;
}
.portal-btn-discord,
a.portal-btn.portal-btn-discord,
a[href="/login"].portal-btn,
a[href="/login"].login-button {
    color: #fff !important;
    background: var(--fbi-discord) !important;
    border-color: var(--fbi-discord) !important;
}
.portal-btn-gold,
a.portal-btn.portal-btn-gold,
a[href="/login-id"].portal-btn,
a[href="/login-id"].identity-login-button {
    color: #201506 !important;
    background: linear-gradient(135deg, var(--fbi-sand-1) 0%, var(--fbi-sand-2) 52%, #9e713a 100%) !important;
    border-color: var(--fbi-sand-2) !important;
}
.member-actions a[data-dashboard-jump].is-primary,
.member-actions a[href="#dashboard-control"].is-primary,
a[href="/dashboard"].is-primary,
a[href="/dashboard"].dashboard-button,
.dashboard-entry-button {
    color: #1d1200 !important;
    background: linear-gradient(135deg, var(--fbi-gold-1) 0%, var(--fbi-gold-2) 52%, #9a5f09 100%) !important;
    border-color: var(--fbi-gold-2) !important;
}
.member-actions a.member-action-memberships,
a[href^="/memberships"].member-action-memberships,
a[href^="/memberships"].is-primary,
.membership-button {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(84,232,255,.32), rgba(118,107,255,.30)) !important;
    border-color: rgba(84,232,255,.68) !important;
}
.member-actions a.is-danger,
.member-actions a.is-logout,
a[href="/logout"],
button.danger,
.btn-danger,
.danger-button {
    color: #fff !important;
    background: var(--fbi-red) !important;
    border-color: var(--fbi-red) !important;
}
.home-dashboard-info {
    justify-items: center !important;
    text-align: center !important;
}
.home-dashboard-info h3,
.home-dashboard-info p,
.home-dashboard-info small {
    justify-self: center !important;
    text-align: center !important;
}
.home-dashboard-info .home-dashboard-status.is-direct,
.server-status-badge.online,
.status-badge.online {
    color: #03140a !important;
    background: var(--fbi-green) !important;
    border-color: var(--fbi-green) !important;
}
.home-dashboard-info .home-dashboard-status.is-offline,
.server-status-badge.offline,
.status-badge.offline {
    color: #ff6b7a !important;
    background: rgba(255,35,61,.13) !important;
    border-color: rgba(255,35,61,.56) !important;
}
.home-dashboard-image,
.home-dashboard-image img,
.bot-server-icon img,
.bot-server-card img,
.dashboard-server-card img {
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}
.home-dashboard-image::after {
    display: none !important;
    content: none !important;
    background: none !important;
}
input,
select,
textarea,
.input,
.form-control {
    background: rgba(2,9,18,.78) !important;
    border-color: rgba(48,72,99,.50) !important;
    color: var(--fbi-text-white) !important;
    box-shadow: none !important;
}
input::placeholder,
textarea::placeholder {
    color: rgba(244,247,251,.46) !important;
}

.map-error-state { gap: 10px; }
.map-error-state .map-action { margin: 8px auto 0; min-width: 150px; }


/* map client performance patch */
#gtaMap { background: #05080e; }
        #gtaMap .leaflet-tile-container { will-change: transform; }
        #gtaMap .leaflet-tile { image-rendering: auto; backface-visibility: hidden; }
        .map-grid-overlay {
            position: absolute !important;
            inset: 0 !important;
            width: 100% !important;
            height: 100% !important;
            z-index: 450;
            pointer-events: none !important;
            contain: strict;
            will-change: opacity;
        }
        .map-grid-overlay.is-moving { opacity: .96; }
        .cell-preview {
            position: relative;
            overflow: hidden;
            background: #06101a;
        }
        .cell-preview canvas {
            width: 100%;
            height: 100%;
            display: block;
        }
        .cell-preview-static-fallback {
            display: grid;
            place-items: center;
            min-height: 150px;
            color: rgba(255,255,255,.78);
            border: 1px solid rgba(159,252,255,.18);
            background: radial-gradient(circle at center, rgba(159,252,255,.14), rgba(0,8,18,.86));
        }
        .owner-name-line {
            display: inline-flex;
            align-items: baseline;
            gap: 7px;
            flex-wrap: wrap;
        }
        .owner-role-chip {
            direction: ltr;
            unicode-bidi: isolate;
            display: inline;
            max-width: 100%;
            padding: 0;
            border: 0;
            background: transparent;
            color: rgba(255,255,255,.62);
            font-size: .84em;
            font-weight: 800;
            line-height: 1.35;
            white-space: nowrap;
        }
        .takeover-chooser[hidden] { display: none !important; }
        .takeover-chooser {
            display: grid;
            gap: 10px;
            margin-top: 10px;
        }
        .action-price {
            display: block;
            margin-top: 3px;
            opacity: .8;
            font-size: .82em;
            font-weight: 700;
        }
        #toggleGrid.active {
            box-shadow: inset 0 0 0 1px rgba(159,252,255,.35);
        }
