/* =========================================================
   module_page_maps — Taktikalar Markazi (NEO3 theme)
   ========================================================= */

.maps-app {
    color: var(--text-default, #fff);
    padding: 4px 2px;
}

.maps-app svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 auto;
}

/* ---------- Head ---------- */
.maps-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.maps-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}
.maps-title svg {
    color: var(--span, #b9994f);
    width: 22px;
    height: 22px;
}
.maps-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary, #8a8d93);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease;
}
.maps-back:hover {
    color: var(--span, #b9994f);
}

/* ---------- Buttons ---------- */
.maps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .14));
    border-radius: 10px;
    background: var(--button, #26272a);
    color: var(--text-default, #fff);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.maps-btn:hover {
    border-color: var(--span, #b9994f);
    background: var(--button-hover, #303134);
}
.maps-btn svg {
    width: 15px;
    height: 15px;
}
.maps-btn-primary {
    border: none;
    background: var(--span, #b9994f);
    color: var(--text-default-invert, #1a1a1a);
}
.maps-btn-primary:hover {
    filter: brightness(1.08);
}
.maps-btn[disabled] {
    opacity: .6;
    cursor: wait;
}

/* ---------- Map grid ---------- */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(var(--maps-cols, 4), minmax(0, 1fr));
    gap: 14px;
}
.maps-card {
    display: block;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 14px;
    overflow: hidden;
    background: var(--card, #26272a);
    text-decoration: none;
    color: var(--text-default, #fff);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.maps-card:hover {
    transform: translateY(-3px);
    border-color: var(--span, #b9994f);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.maps-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: var(--card, #201d18);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.maps-card-ph svg {
    width: 38px;
    height: 38px;
    color: var(--span, #b9994f);
    opacity: .35;
}
.maps-card-hover {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 9px;
    background: var(--span, #b9994f);
    color: var(--text-default-invert, #1a1a1a);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
}
.maps-card-hover svg {
    width: 13px;
    height: 13px;
}
.maps-card:hover .maps-card-hover {
    opacity: 1;
    transform: translateY(0);
}
.maps-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
}
.maps-card-name {
    font-size: 14px;
    font-weight: 700;
}
.maps-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
}
.maps-card-count {
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
}
.maps-card-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.maps-app .maps-card-views svg {
    width: 12px;
    height: 12px;
    opacity: .7;
}
.maps-card-favs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--span, #b9994f);
    font-size: 11px;
    font-weight: 700;
}
.maps-app .maps-card-favs svg {
    width: 12px;
    height: 12px;
    fill: var(--span, #b9994f);
}

/* ---------- Stats strip + recently added ---------- */
.maps-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.maps-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 12px;
    background: var(--card, #26272a);
}
.maps-app .maps-stat svg {
    width: 16px;
    height: 16px;
    margin-bottom: 4px;
    color: var(--span, #b9994f);
}
.maps-stat b {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}
.maps-stat span {
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.maps-recent {
    margin-top: 20px;
}
.maps-recent__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--span, #b9994f);
    margin-bottom: 10px;
}
.maps-app .maps-recent__title svg {
    width: 15px;
    height: 15px;
}
.maps-recent__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}
.maps-recent__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 12px;
    background: var(--card, #26272a);
    color: var(--text-default, #fff);
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}
.maps-recent__item:hover {
    border-color: var(--span, #b9994f);
    transform: translateY(-2px);
}
.maps-recent__type {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 9px;
    border: 1px solid var(--maps-type, var(--span, #b9994f));
    background: rgba(255, 255, 255, .04);
}
.maps-app .maps-recent__type svg {
    width: 15px;
    height: 15px;
    fill: var(--maps-type, var(--span, #b9994f));
}
.maps-recent__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-right: auto;
    min-width: 0;
}
.maps-recent__name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maps-recent__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
}
.maps-recent__team {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--maps-type, var(--span, #b9994f));
}
.maps-recent__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
}
.maps-recent__views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-default, #fff);
    font-size: 12px;
    font-weight: 700;
}
.maps-app .maps-recent__views svg {
    width: 12px;
    height: 12px;
    opacity: .7;
}

/* ---------- View counters (head + modal) ---------- */
.maps-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.maps-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 999px;
    background: var(--card, #26272a);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary, #8a8d93);
    white-space: nowrap;
}
.maps-app .maps-meta__item svg {
    width: 13px;
    height: 13px;
    color: var(--span, #b9994f);
}
.maps-modal__views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary, #8a8d93);
    white-space: nowrap;
}
.maps-modal__views[hidden] {
    display: none;
}
.maps-app .maps-modal__views svg {
    width: 13px;
    height: 13px;
    opacity: .7;
}

/* ---------- Map schema (detail) ---------- */
.maps-zoom {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 70vh;
    overflow: hidden;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 16px;
    background-color: var(--card, #191512);
    /* one finger keeps scrolling the page, two fingers drive pinch-zoom */
    touch-action: pan-y;
}
.maps-zoom--pick {
    aspect-ratio: 16 / 9;
    max-height: none;
}
.maps-schema {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform-origin: 0 0;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
}
/* a permanently promoted layer keeps its 1x raster and the GPU magnifies it, so the radar goes soft;
   the hint only lives while a gesture is running */
.maps-schema.is-zooming {
    will-change: transform;
}
.maps-schema-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 40px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 40px);
}
.maps-schema-hint {
    font-size: 13px;
    color: var(--text-secondary, #8a8d93);
    padding: 0 20px;
    text-align: center;
}

/* ---------- Zoom controls ---------- */
.maps-zoom.is-zoomed {
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.maps-zoom.is-zoomed:active {
    cursor: grabbing;
}
.maps-zoom__ctrl {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 7;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.maps-zoom__btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .16));
    border-radius: 8px;
    background: var(--bg-modal, rgba(18, 16, 14, .82));
    color: var(--text-secondary, #a9acb2);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.maps-zoom__btn:hover {
    color: var(--span, #b9994f);
    border-color: var(--span, #b9994f);
}
.maps-zoom__btn:disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}
.maps-zoom__btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}
.maps-zoom__level {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 7;
    padding: 3px 8px;
    border-radius: 7px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .16));
    background: var(--bg-modal, rgba(18, 16, 14, .82));
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary, #a9acb2);
}
.maps-zoom__level[hidden] {
    display: none;
}

.maps-point {
    position: absolute;
    transform: translate(-50%, -50%) scale(var(--zs, 1));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    z-index: 2;
    /* theme's global button{transition:all} would animate the zoom counter-scale */
    transition: none;
}
.maps-point--smoke   { --maps-type: #d9a441; }
.maps-point--molotov { --maps-type: #ff7043; }
.maps-point--flash   { --maps-type: #ffd54f; }
.maps-point--he      { --maps-type: #4fc3f7; }

.maps-point-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    transition: transform .15s ease;
}
.maps-app .maps-point-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--maps-type, var(--span, #b9994f));
    stroke: rgba(0, 0, 0, .6);
    stroke-width: .7;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .75));
}
.maps-point-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--maps-type, var(--span, #b9994f));
    opacity: .5;
    animation: maps-pulse 1.8s ease-out infinite;
}
.maps-point:hover .maps-point-icon,
.maps-point--preview .maps-point-icon {
    transform: scale(1.22);
}
.maps-point-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .65);
    color: var(--text-default, #fff);
    opacity: 0;
    transform: translateY(3px);
    transition: opacity .15s ease, transform .15s ease;
    pointer-events: none;
}
.maps-point:hover .maps-point-label {
    opacity: 1;
    transform: translateY(0);
}
.maps-point--preview {
    pointer-events: none;
    z-index: 3;
}
.maps-point[hidden] {
    display: none;
}
.maps-point--preview .maps-point-label {
    display: none;
}

@keyframes maps-pulse {
    0%   { transform: scale(.6); opacity: .7; }
    70%  { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}

/* ---------- Grenade type: legend / chips / tags ---------- */
.maps-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.maps-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: var(--bg-modal, rgba(12, 10, 9, .8));
    backdrop-filter: blur(4px);
    color: var(--text-default, #fff);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: opacity .15s ease, border-color .15s ease, background-color .15s ease;
}
.maps-legend__item:hover {
    border-color: var(--maps-type, var(--span, #b9994f));
}
.maps-legend__item.is-off {
    opacity: .4;
}
.maps-legend__item[disabled] {
    opacity: .28;
    cursor: default;
}
.maps-app .maps-legend__item svg {
    width: 16px;
    height: 16px;
    fill: var(--maps-type, var(--span, #b9994f));
}
.maps-legend__count {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: var(--maps-type, var(--span, #b9994f));
}

/* ---------- Toolbar: qidiruv + jamoa filtri (xarita ichida) ---------- */
.maps-toolbar {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: calc(100% - 20px);
}
.maps-search {
    position: relative;
    flex: 1 1 240px;
    min-width: 0;
    max-width: 340px;
}
.maps-app .maps-search input[type="text"] {
    width: 100%;
    height: 38px;
    padding: 0 34px;
    font-size: 13px;
    background: var(--bg-modal, rgba(12, 10, 9, .82));
    backdrop-filter: blur(4px);
}
.maps-search__icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    fill: var(--text-secondary, #8a8d93);
    pointer-events: none;
}
.maps-search__clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary, #8a8d93);
    cursor: pointer;
}
.maps-search__clear:hover {
    color: var(--text-default, #fff);
    background: var(--card, #26272a);
}
.maps-app .maps-search__clear svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}
.maps-search__clear[hidden] {
    display: none;
}
.maps-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.maps-legend__dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--maps-type, var(--span, #b9994f));
}
.maps-toolbar__count {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: var(--bg-modal, rgba(12, 10, 9, .8));
    color: var(--span, #b9994f);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.maps-toolbar__count[hidden] {
    display: none;
}
.maps-noresult {
    margin-top: 14px;
    text-align: center;
    color: var(--text-secondary, #8a8d93);
    font-size: 13px;
}
.maps-noresult[hidden] {
    display: none;
}

.maps-form-group {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.maps-form-group__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-secondary, #8a8d93);
}
.maps-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.maps-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: rgba(0, 0, 0, .25);
    color: var(--text-secondary, #8a8d93);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.maps-chip:hover {
    border-color: var(--maps-type, var(--span, #b9994f));
}
.maps-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.maps-app .maps-chip svg {
    width: 16px;
    height: 16px;
    fill: var(--maps-type, var(--span, #b9994f));
    transition: transform .15s ease;
}
.maps-chip input:checked + svg {
    transform: scale(1.2);
}
.maps-chip input:checked + svg + span {
    color: var(--maps-type, var(--span, #b9994f));
}
.maps-chip:has(input:checked) {
    border-color: var(--maps-type, var(--span, #b9994f));
    background: rgba(0, 0, 0, .45);
}

.maps-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--maps-type, var(--span, #b9994f));
}
.maps-app .maps-type-tag svg {
    width: 14px;
    height: 14px;
    fill: var(--maps-type, var(--span, #b9994f));
}

.maps-modal__type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 11px;
    border-radius: 999px;
    border: 1px solid var(--maps-type, var(--span, #b9994f));
    color: var(--maps-type, var(--span, #b9994f));
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}
.maps-modal__type[hidden] {
    display: none;
}
.maps-app .maps-modal__type svg {
    width: 14px;
    height: 14px;
    fill: var(--maps-type, var(--span, #b9994f));
}

/* ---------- Raskidka modal ---------- */
.maps-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(0, 0, 0, .72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.maps-modal[hidden] {
    display: none;
}
.maps-modal__content {
    position: relative;
    width: 620px;
    max-width: 100%;
    background: var(--bg-modal, #1b1c1e);
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    overflow: hidden;
}
.maps-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--transparent-10-w, rgba(255, 255, 255, .08));
    font-size: 14px;
    font-weight: 700;
}
.maps-modal__title {
    margin-right: auto;
}
.maps-modal__close,
.maps-modal__share {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-secondary, #8a8d93);
    cursor: pointer;
    flex: 0 0 auto;
}
.maps-modal__close:hover,
.maps-modal__share:hover {
    color: var(--text-default, #fff);
    background: var(--card, #26272a);
}
.maps-modal__index {
    flex: 0 0 auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: var(--text-secondary, #8a8d93);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.maps-modal__index[hidden] {
    display: none;
}
.maps-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 46px;
    padding: 0;
    border-radius: 10px;
    background: var(--bg-modal, rgba(18, 16, 14, .72));
    color: var(--text-default, #fff);
    cursor: pointer;
    z-index: 2;
}
.maps-modal__nav:hover {
    background: var(--bg-modal, rgba(18, 16, 14, .96));
}
.maps-app .maps-modal__nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.maps-modal__nav--prev {
    left: 8px;
}
.maps-modal__nav--next {
    right: 8px;
}
.maps-modal__nav[hidden] {
    display: none;
}
.maps-modal__media {
    aspect-ratio: 16 / 9;
    background: #000;
}
.maps-modal__media iframe,
.maps-modal__media video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.maps-modal__novideo {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #8a8d93);
    font-size: 13px;
}
.maps-modal__desc {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-line;
    color: var(--text-secondary, #a9acb2);
    border-top: 1px solid var(--transparent-10-w, rgba(255, 255, 255, .08));
    max-height: 190px;
    overflow-y: auto;
}
.maps-modal__desc[hidden] {
    display: none;
}
.maps-modal__rate {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
}
.maps-modal__rate + .maps-modal__foot {
    padding-top: 0;
}
.maps-rate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: var(--card, #26272a);
    color: var(--text-secondary, #8a8d93);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.maps-rate:hover {
    color: var(--text-default, #fff);
    border-color: var(--span, #b9994f);
}
.maps-app .maps-rate svg {
    width: 14px;
    height: 14px;
}
.maps-rate.is-on {
    color: var(--span, #b9994f);
    border-color: var(--span, #b9994f);
    background: var(--span-10, rgba(185, 153, 79, .12));
}
.maps-rate:disabled {
    opacity: .55;
    cursor: default;
}
.maps-modal__author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 12px;
    color: var(--text-secondary, #8a8d93);
}
.maps-modal__author[hidden] {
    display: none;
}
.maps-app .maps-modal__author svg {
    width: 13px;
    height: 13px;
    opacity: .7;
}
.maps-modal__author span {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.maps-modal__foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}
.maps-modal__foot[hidden] {
    display: none;
}
.maps-modal__bind {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--card, #26272a);
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-secondary, #8a8d93);
}

/* ---------- Admin ---------- */
.maps-admin-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(0, 0, 0, .14)), var(--card, #26272a);
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 16px;
    padding: 16px 16px 18px;
    margin-top: 16px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}
.maps-admin-card__title {
    position: relative;
    padding-left: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--span, #b9994f);
    margin-bottom: 14px;
}
.maps-admin-card__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 13px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--span, #b9994f), var(--span-middle, rgba(185, 153, 79, .25)));
}
.maps-admin-hint {
    margin: -6px 0 12px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary, rgba(255, 255, 255, .55));
}
.maps-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.maps-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px 14px;
}
.maps-form-grid > label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #8a8d93);
}
.maps-app input[type="text"],
.maps-app input[type="number"] {
    background: var(--input-form, rgba(0, 0, 0, .25));
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 8px;
    color: var(--text-default, #fff);
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
    min-width: 0;
}
.maps-app input[type="text"]:focus,
.maps-app input[type="number"]:focus {
    border-color: var(--span, #b9994f);
}
.maps-app textarea {
    background: var(--input-form, rgba(0, 0, 0, .25));
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 8px;
    color: var(--text-default, #fff);
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.5;
    font-family: inherit;
    width: 100%;
    min-height: 66px;
    max-width: 100%;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}
.maps-app textarea:focus {
    border-color: var(--span, #b9994f);
}
.maps-app input[type="file"] {
    display: none;
}
.maps-file-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.maps-file-label {
    display: inline-block;
    vertical-align: middle;
    font-size: 12px;
    color: var(--span, #b9994f);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.maps-form-coords {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-secondary, #8a8d93);
}
.maps-table .maps-file-label {
    max-width: 130px;
}
.maps-form-coords b {
    color: var(--span, #b9994f);
}
.maps-pick-title {
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
    margin: 12px 0 6px;
}
.maps-schema--pick {
    cursor: crosshair;
}

.maps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.maps-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--text-secondary, #8a8d93);
    padding: 9px 8px;
    border-bottom: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
}
.maps-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--transparent-10-w, rgba(255, 255, 255, .08));
    vertical-align: middle;
}
.maps-table tbody tr {
    transition: background-color .15s ease;
}
.maps-table tbody tr:hover {
    background: rgba(255, 255, 255, .03);
}
.maps-table tbody tr:last-child td {
    border-bottom: none;
}
.maps-rename-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.maps-table .maps-rename {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}
.maps-table-actions {
    text-align: right;
    white-space: nowrap;
}
.maps-table-actions .maps-icon-btn {
    vertical-align: middle;
}
.maps-table-actions .maps-icon-btn + .maps-icon-btn {
    margin-left: 6px;
}
.maps-icon-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, #8a8d93);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease;
}
.maps-icon-btn:hover {
    color: var(--span, #b9994f);
    border-color: var(--span, #b9994f);
}
.maps-icon-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex: 0 0 auto;
}

/* ---------- Teams (CT / T) ---------- */
.maps-team--ct { --maps-type: var(--ct, #4fb3e8); }
.maps-team--t  { --maps-type: var(--t, #e39b3f); }

.maps-team-badge {
    display: inline-block;
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--maps-type, var(--span, #b9994f));
    color: var(--maps-type, var(--span, #b9994f));
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}
.maps-chip__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--maps-type, var(--span, #b9994f));
    box-shadow: 0 0 8px var(--maps-type, rgba(0, 0, 0, .4));
}

/* ---------- Throw line + marker ---------- */
.maps-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
}
.maps-line {
    fill: none;
    stroke: var(--maps-type, var(--span, #b9994f));
    stroke-width: 1.6;
    stroke-dasharray: 5 4;
    stroke-linecap: round;
    opacity: 0;
    transition: opacity .12s ease;
}
.maps-line.is-on {
    opacity: .85;
}
.maps-throw {
    position: absolute;
    transform: translate(-50%, -50%) scale(var(--zs, 1));
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid var(--maps-type, var(--span, #b9994f));
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    transition: opacity .12s ease;
    cursor: pointer;
    z-index: 1;
}
.maps-throw::after {
    content: '';
    position: absolute;
    inset: -9px;
}
.maps-throw.is-on {
    opacity: 1;
}
.maps-line.is-hidden,
.maps-throw.is-hidden {
    display: none;
}
.maps-throw[hidden] {
    display: none;
}

/* ---------- Draggable admin pins ---------- */
.maps-pin {
    position: absolute;
    transform: translate(-50%, -50%) scale(var(--zs, 1));
    width: 15px;
    height: 15px;
    padding: 0;
    margin: 0;
    border: 2px solid var(--maps-type, var(--span, #b9994f));
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .3);
    cursor: move;
    touch-action: none;
    transition: none;
    z-index: 3;
}
.maps-pin::after {
    content: '';
    position: absolute;
    inset: -8px;
}
.maps-pin:hover,
.maps-pin.is-moving {
    background: var(--maps-type, var(--span, #b9994f));
}
.maps-pin.is-moving {
    box-shadow: 0 0 0 5px rgba(0, 0, 0, .35);
}
.maps-pin--throw {
    width: 13px;
    height: 13px;
    border-style: dashed;
    border-radius: 4px;
    background: transparent;
}
.maps-pin--throw:hover,
.maps-pin--throw.is-moving {
    background: rgba(0, 0, 0, .5);
}

/* ---------- Hover preview card ---------- */
.maps-hover {
    position: absolute;
    z-index: 6;
    width: 264px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-modal, rgba(18, 16, 14, .97));
    border: 1px solid var(--maps-type, var(--transparent-20-w, rgba(255, 255, 255, .12)));
    box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
    pointer-events: none;
    transform: translate(22px, -50%);
}
.maps-hover--left {
    transform: translate(calc(-100% - 22px), -50%);
}
.maps-hover--below {
    transform: translate(22px, -16px);
}
.maps-hover--above {
    transform: translate(22px, calc(-100% + 16px));
}
.maps-hover--left.maps-hover--below {
    transform: translate(calc(-100% - 22px), -16px);
}
.maps-hover--left.maps-hover--above {
    transform: translate(calc(-100% - 22px), calc(-100% + 16px));
}
.maps-hover[hidden] {
    display: none;
}
.maps-hover__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.maps-hover__media video,
.maps-hover__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.maps-hover__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 11px 11px;
}
.maps-hover__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-default, #fff);
}
.maps-hover__meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--maps-type, var(--span, #b9994f));
}
.maps-hover__desc {
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-secondary, #a9acb2);
    white-space: pre-line;
    max-height: 92px;
    overflow: hidden;
}
.maps-hover__desc[hidden] {
    display: none;
}

/* ---------- Pick mode toggle ---------- */
.maps-pick-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.maps-pick-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: rgba(0, 0, 0, .25);
    color: var(--text-secondary, #8a8d93);
    border-radius: 8px;
}
.maps-pick-btn.is-active {
    border-color: var(--span, #b9994f);
    background: var(--span-10, rgba(185, 153, 79, .16));
    color: var(--span, #b9994f);
}
.maps-pick-clear {
    padding: 6px 14px;
    font-size: 12px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: transparent;
    color: var(--text-secondary, #8a8d93);
    border-radius: 8px;
}
.maps-btn[hidden] {
    display: none;
}

/* ---------- Visual settings (admin) ---------- */
.maps-visual-row {
    display: grid;
    grid-template-columns: 178px minmax(0, 1fr);
    align-items: start;
    gap: 8px 16px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.maps-visual-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.maps-visual-row__label {
    padding-top: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .35px;
    color: var(--text-secondary, #8a8d93);
}
.maps-visual-opts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
}
.maps-visual-num {
    width: 96px;
}
.maps-visual-hint {
    flex: 1 0 100%;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--text-secondary, rgba(255, 255, 255, .5));
}
.maps-admin-card__count {
    margin-left: 8px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-default, #fff);
}
/* the layout/column/block switches are pills: the native control stays in the DOM for JS + keyboard */
.maps-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: var(--bg-modal, rgba(12, 10, 9, .8));
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #8a8d93);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.maps-radio:hover {
    border-color: var(--span, #b9994f);
    color: var(--text-default, #fff);
}
.maps-radio input {
    position: absolute;
    display: inline-block;
    visibility: visible;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}
.maps-radio > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.maps-radio > span::before {
    content: '';
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border: 1px solid rgba(255, 255, 255, .3);
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.maps-radio input[type="radio"] + span::before {
    border-radius: 50%;
}
.maps-radio input[type="checkbox"] + span::before {
    border-radius: 3px;
}
.maps-radio input:checked + span::before {
    background: var(--span, #b9994f);
    border-color: var(--span, #b9994f);
    box-shadow: inset 0 0 0 2px var(--card, #17130f);
}
.maps-radio:has(input:checked) {
    border-color: var(--span-half, rgba(185, 153, 79, .55));
    background: var(--span-10, rgba(185, 153, 79, .13));
    color: var(--text-default, #fff);
}
.maps-radio:has(input:focus-visible) {
    outline: 2px solid var(--span, #b9994f);
    outline-offset: 2px;
}

/* ---------- List layout ---------- */
.maps-grid--list .maps-card {
    display: flex;
    align-items: stretch;
}
.maps-grid--list .maps-card-media {
    flex: 0 0 40%;
    width: 40%;
    min-height: 92px;
    aspect-ratio: auto;
}
.maps-grid--list .maps-card-body {
    flex: 1 1 auto;
    align-items: center;
    padding: 12px 14px;
}

/* ---------- Uploaded image preview ---------- */
/* no transform on this box: scaling a full-resolution background image re-rasterises it on every
   hover change, and hover changes on every frame while the rows slide under the cursor */
.maps-file-thumb {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background-color: var(--card, #201d18);
    background-size: cover;
    background-position: center;
}

/* ---------- Favourites ---------- */
.maps-app .maps-fav svg {
    width: 13px;
    height: 13px;
}
.maps-fav-chip.is-on {
    border-color: var(--span, #b9994f);
    background: var(--span-10, rgba(185, 153, 79, .18));
    color: var(--span, #b9994f);
}
.maps-fav-mark {
    color: var(--text-secondary, #8a8d93);
}
.maps-fav-mark.is-on {
    color: var(--span, #b9994f);
    font-weight: 700;
}

/* ---------- Limit row + admin shortcuts ---------- */
.maps-admin-card__title--btn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.maps-btn-add {
    padding: 6px 10px;
    border-color: var(--span, #b9994f);
    background: transparent;
    color: var(--span, #b9994f);
    font-size: 11px;
}
.maps-btn-add svg {
    width: 12px;
    height: 12px;
}
.maps-btn-add:hover {
    background: var(--span-10, rgba(185, 153, 79, .12));
}
.maps-limit-value {
    color: var(--span, #b9994f);
    font-weight: 700;
}
.maps-row-open {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--span-half, rgba(185, 153, 79, .4));
    background: var(--span-10, rgba(185, 153, 79, .12));
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--span, #b9994f);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.maps-row-open:hover {
    background: var(--span, #b9994f);
    color: var(--text-default-invert, #171310);
    text-decoration: none;
}
a.maps-file-thumb {
    cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .maps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .maps-stat {
        padding: 10px;
    }
    .maps-stat b {
        font-size: 17px;
    }
    .maps-recent__grid {
        grid-template-columns: 1fr;
    }
    .maps-head .maps-meta {
        width: 100%;
    }
    .maps-visual-row__label {
        flex: 1 0 100%;
    }
    .maps-title {
        font-size: 17px;
    }
    .maps-zoom {
        aspect-ratio: 4 / 3;
    }
    .maps-search {
        flex: 1 1 150px;
    }
    .maps-point-label {
        opacity: 1;
        transform: none;
        font-size: 10px;
    }
    .maps-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
@media (max-width: 560px) {
    .maps-grid {
        grid-template-columns: 1fr;
    }
    .maps-grid--list .maps-card {
        flex-direction: column;
    }
    .maps-grid--list .maps-card-media {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
}

.maps-app a:focus-visible,
.maps-app button:focus-visible,
.maps-app input:focus-visible,
.maps-app select:focus-visible,
.maps-app textarea:focus-visible {
    outline: 2px solid var(--span, #b9994f);
    outline-offset: 2px;
}
.maps-app .maps-modal:focus,
.maps-app .maps-modal:focus-visible {
    outline: none;
}

/* ---------- Lineup metadata: badges, steps, pickers ---------- */
.maps-app select {
    background: var(--input-form, rgba(0, 0, 0, .25));
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 8px;
    color: var(--text-default, #fff);
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
}
.maps-app select option {
    background: var(--card, #26272a);
    color: var(--text-default, #fff);
}
.maps-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 0;
}
.maps-modal__meta[hidden] {
    display: none;
}
.maps-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    background: rgba(0, 0, 0, .2);
    font-size: 12px;
}
.maps-badge i {
    font-style: normal;
    color: var(--text-secondary, #8a8d93);
}
.maps-badge b {
    font-weight: 600;
    color: var(--text-default, #fff);
}
.maps-badge--zone {
    border-color: var(--transparent-20-w, rgba(255, 255, 255, .2));
}
.maps-badge--method b {
    color: var(--span, #b9994f);
}
.maps-badge--difficulty b {
    letter-spacing: 2px;
    color: var(--span, #b9994f);
}
.maps-steps {
    margin: 0;
    padding-left: 20px;
    white-space: normal;
}
.maps-steps li {
    margin-bottom: 4px;
}
.maps-steps li::marker {
    color: var(--span, #b9994f);
    font-weight: 700;
}
.maps-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-modal, rgba(12, 10, 9, .8));
    backdrop-filter: blur(4px);
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    transition: border-color .15s ease, background-color .15s ease;
}
.maps-select:hover {
    border-color: var(--span, #b9994f);
}
.maps-select > span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--text-secondary, #8a8d93);
}
/* the real select keeps the state, the themed button shows it */
.maps-dd__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.maps-dd__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 2px 2px 5px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-default, #fff);
    cursor: pointer;
    transition: color .14s ease;
}
.maps-dd__btn:hover {
    color: var(--span, #b9994f);
}
.maps-dd__value {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.maps-dd__arrow {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .65;
    transition: transform .16s ease;
}
.maps-dd.is-open .maps-dd__arrow {
    transform: rotate(180deg);
}
/* a filter that actually narrows the list reads as "on" */
.maps-dd.is-filled {
    border-color: var(--span-half, rgba(185, 153, 79, .5));
    background: var(--span-10, rgba(185, 153, 79, .1));
}
.maps-dd.is-filled > span {
    color: var(--span, #b9994f);
}
.maps-dd__menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 24;
    min-width: 100%;
    max-width: min(300px, 80vw);
    max-height: 250px;
    overflow: auto;
    padding: 5px;
    border-radius: 12px;
    background: var(--card, #171310);
    border: 1px solid var(--span-middle, rgba(185, 153, 79, .26));
    box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
    animation: maps-dd-in .13s ease-out;
}
/* in list mode the bar sits at the top of the panel, so the menu hangs below */
.maps-app[data-view="list"] .maps-dd__menu {
    bottom: auto;
    top: calc(100% + 8px);
}
.maps-dd__menu[hidden] {
    display: none;
}
@keyframes maps-dd-in {
    from { opacity: 0; transform: scale(.97); }
    to   { opacity: 1; transform: none; }
}
.maps-dd__opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-default, #fff);
    white-space: nowrap;
    cursor: pointer;
}
.maps-dd__opt:hover,
.maps-dd__opt.is-active {
    background: rgba(255, 255, 255, .07);
}
.maps-dd__opt.is-sel {
    color: var(--span, #b9994f);
    font-weight: 700;
    background: var(--span-10, rgba(185, 153, 79, .13));
}
.maps-dd__opt.is-sel::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--span, #b9994f);
}
@media (prefers-reduced-motion: reduce) {
    .maps-dd__menu {
        animation: none;
    }
    .maps-dd__arrow {
        transition: none;
    }
}

/* ---------- Radar / list view switch + always-on callout names ---------- */
.maps-app .maps-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}
.maps-app .maps-toggle.is-on {
    border-color: var(--span, #b9994f);
    color: var(--span, #b9994f);
}
.maps-app[data-view="list"] .maps-schema,
.maps-app[data-view="list"] .maps-zoom__ctrl,
.maps-app[data-view="list"] .maps-zoom__level,
.maps-app[data-view="list"] .maps-hover {
    display: none;
}
.maps-app[data-view="list"] .maps-toolbar {
    position: static;
    max-width: none;
}
.maps-app[data-view="list"] .maps-zoom {
    /* the schema is gone in this mode, so the box must hug the filter bar instead of
       keeping the 16/10 map frame and pushing the list below the fold */
    aspect-ratio: auto;
    max-height: none;
    overflow: visible;
    padding: 10px;
}
.maps-list-view {
    display: none;
}
.maps-app[data-view="list"] .maps-list-view {
    display: block;
    margin-top: 14px;
}
.maps-list-group {
    margin-bottom: 16px;
}
.maps-list-group[hidden] {
    display: none;
}
.maps-list-group__title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--transparent-10-w, rgba(255, 255, 255, .08));
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--span, #b9994f);
}
.maps-list-group__title svg {
    width: 14px;
    height: 14px;
}
.maps-list-group__title b {
    margin-left: auto;
    color: var(--text-secondary, #8a8d93);
    font-weight: 600;
}
.maps-list-group--unset .maps-list-group__title {
    color: var(--text-secondary, #8a8d93);
}
.maps-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--card, #26272a);
    color: var(--text-default, #fff);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.maps-list-row + .maps-list-row {
    margin-top: 6px;
}
.maps-list-row:hover {
    border-color: var(--span, #b9994f);
}
.maps-list-row[hidden] {
    display: none;
}
.maps-list-row__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .3);
}
.maps-list-row__icon svg {
    width: 15px;
    height: 15px;
}
.maps-list-row__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.maps-list-row__name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.maps-list-row__callout {
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
}
.maps-list-row__tags {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.maps-tag {
    font-style: normal;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--transparent-10-w, rgba(255, 255, 255, .08));
    color: var(--text-secondary, #a9acb2);
}
.maps-tag--difficulty {
    letter-spacing: 2px;
    color: var(--span, #b9994f);
}
.maps-list-row__stats {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary, #8a8d93);
}
.maps-list-row__stats > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.maps-list-row__stats svg {
    width: 13px;
    height: 13px;
}
.maps-list-row__stats .is-on {
    color: var(--span, #b9994f);
}

@media (max-width: 640px) {
    .maps-list-row {
        flex-wrap: wrap;
    }
    .maps-list-row__main {
        flex: 1 1 60%;
    }
    .maps-list-row__tags {
        order: 3;
        flex: 1 1 100%;
    }
}

/* ---------- Outdated flag, zone filter, site wide search ---------- */
.maps-app .maps-flag svg {
    fill: currentColor;
}
.maps-rate.maps-flag.is-on {
    color: var(--red, #d8695f);
    border-color: var(--red, rgba(216, 105, 95, .5));
    background: var(--red-10, rgba(216, 105, 95, .12));
}
.maps-flag-mark {
    color: var(--text-secondary, #8a8d93);
}
.maps-flag-mark.is-on {
    color: var(--red, #d8695f);
    font-weight: 800;
}
.maps-app .maps-clear-flag {
    margin-left: 4px;
    color: var(--red, #d8695f);
}
.maps-clear-flag[hidden] {
    display: none;
}

.maps-searchbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.maps-searchbar__field {
    position: relative;
    flex: 1 1 260px;
    min-width: 0;
    max-width: 480px;
}
.maps-app .maps-searchbar__field input[type="text"] {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 34px;
    font-size: 13px;
    background: var(--bg-modal, rgba(12, 10, 9, .82));
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 9px;
    color: var(--text-default, #fff);
}
.maps-app .maps-searchbar svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex: 0 0 auto;
}
.maps-app .maps-searchbar__field .maps-search__icon {
    width: 15px;
    height: 15px;
}

.maps-results {
    margin-bottom: 18px;
}
.maps-results__title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--transparent-10-w, rgba(255, 255, 255, .08));
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--span, #b9994f);
}
.maps-results__title svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.maps-results__title b {
    margin-left: auto;
    color: var(--text-secondary, #8a8d93);
    font-weight: 600;
}
.maps-results__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--card, #26272a);
    color: var(--text-default, #fff);
    text-decoration: none;
}
.maps-results__item + .maps-results__item {
    margin-top: 6px;
}
.maps-results__item:hover {
    border-color: var(--span, #b9994f);
    text-decoration: none;
}
.maps-results__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .3);
    color: var(--maps-type, var(--span, #b9994f));
}
.maps-results__icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}
.maps-results__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.maps-results__name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.maps-results__meta {
    font-size: 11px;
    color: var(--text-secondary, #8a8d93);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.maps-results__team {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--maps-type, var(--span, #b9994f));
    color: var(--maps-type, var(--span, #b9994f));
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 640px) {
    .maps-results__item {
        flex-wrap: wrap;
    }
    .maps-results__main {
        flex: 1 1 60%;
    }
}

/* ---------- Admin panel geometry ---------- */
.maps-table-wrap {
    overflow-x: auto;
    margin: 0 -6px;
    padding: 0 6px;
}
.maps-table-wrap--maps .maps-table {
    table-layout: fixed;
    min-width: 760px;
}
.maps-col-name { width: 25%; }
.maps-col-img { width: 13%; }
.maps-col-num { width: 9%; }
.maps-col-act { width: 18%; }
.maps-cell-name { min-width: 0; }
.maps-cell-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary, #8a8d93);
}
.maps-cell-num b {
    color: var(--text-default, #fff);
    font-weight: 700;
}
.maps-table-actions > * + * {
    margin-left: 6px;
}
.maps-row-avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 23px;
    border-radius: 6px;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .14));
    background-color: var(--card, #201d18);
    background-size: cover;
    background-position: center;
}
.maps-row-avatar.is-empty {
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 5px, transparent 5px 10px);
}

/* one upload tile per image field: the action reveals on hover, never on its own row */
.maps-tile {
    position: relative;
    display: block;
    width: 100%;
    max-width: 132px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
    border-radius: 10px;
    background: var(--card, #201d18);
    transition: border-color .15s ease;
}
.maps-tile:hover {
    border-color: var(--span, #b9994f);
}
.maps-file-thumb.is-empty {
    position: relative;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .045) 0 7px, transparent 7px 14px);
}
.maps-file-thumb.is-empty::after {
    content: attr(title);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 6px;
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
    color: var(--text-secondary, rgba(255, 255, 255, .5));
}
.maps-tile__btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 8px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    border-radius: 0;
    background: var(--bg-modal, rgba(12, 10, 9, .93));
    color: var(--text-default, #fff);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .18s ease, transform .18s ease, background-color .15s ease, color .15s ease;
}
.maps-tile:hover .maps-tile__btn,
.maps-tile:focus-within .maps-tile__btn {
    opacity: 1;
    transform: none;
}
.maps-tile__btn:hover {
    background: var(--span, #b9994f);
    color: var(--text-default-invert, #171310);
}
.maps-tile__btn svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
    flex: 0 0 auto;
}
.maps-cell-img .maps-file-label {
    display: block;
    max-width: 132px;
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.3;
}
/* a touch device never hovers, so the action must be reachable */
@media (hover: none) {
    .maps-tile__btn {
        opacity: 1;
        transform: none;
    }
}
@media (max-width: 768px) {
    .maps-visual-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
    .maps-visual-row__label {
        padding-top: 0;
    }
    .maps-table-wrap--maps .maps-table {
        min-width: 0;
        table-layout: auto;
    }
    .maps-table-wrap--maps col {
        width: auto;
    }
    .maps-table-wrap--maps thead {
        display: none;
    }
    .maps-table-wrap--maps tbody tr {
        display: block;
        margin-bottom: 10px;
        padding: 2px 10px;
        border: 1px solid var(--transparent-20-w, rgba(255, 255, 255, .12));
        border-radius: 12px;
        background: rgba(0, 0, 0, .18);
    }
    .maps-table-wrap--maps tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 0;
    }
    .maps-table-wrap--maps tbody td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .3px;
        color: var(--text-secondary, #8a8d93);
    }
    .maps-table-wrap--maps .maps-tile {
        max-width: 116px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .maps-radio,
    .maps-tile,
    .maps-tile__btn,
    .maps-row-open,
    .maps-table tbody tr {
        transition: none;
    }
}
