.live-map-shell {
    display: grid;
    gap: 24px;
}

.live-map-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) minmax(140px, 200px);
    gap: 16px;
    align-items: end;
}

.live-map-toolbar label {
    display: grid;
    gap: 6px;
}

.live-map-toolbar span {
    color: var(--muted, #c9c0a2);
    font-size: 0.86rem;
}

.live-map-toolbar input,
.live-map-toolbar select {
    width: 100%;
}

.live-map-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.live-map-summary .small-value {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.live-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: stretch;
}

.live-map-stage {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(460px, 68vh) auto;
    gap: 14px;
}

.live-map-stage-head,
.sidebar-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.live-map-stage-head h2,
.sidebar-section-head h2 {
    margin: 0;
}

.live-map-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.live-map-canvas-wrap {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    border: 1px solid rgba(220, 205, 144, 0.24);
    background: #0c0b07;
    border-radius: 8px;
}

.live-map-canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.live-map-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--muted, #c9c0a2);
    text-align: center;
    background: rgba(12, 11, 7, 0.72);
}

.live-map-empty[hidden] {
    display: none;
}

.live-map-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted, #c9c0a2);
    font-size: 0.82rem;
}

.live-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-swatch {
    width: 13px;
    height: 13px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.legend-swatch.chunk {
    background: rgba(55, 63, 48, 0.9);
}

.legend-swatch.player {
    background: #ffffff;
}

.legend-swatch.bot {
    background: #58f5ff;
}

.legend-swatch.door {
    background: #ffcf66;
    border-radius: 999px;
}

.legend-swatch.safe {
    background: #60e08f;
}

.legend-swatch.link {
    background: #d9a5ff;
    transform: rotate(45deg);
}

.live-map-sidebar {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 22px;
}

.live-map-sidebar section {
    display: grid;
    gap: 10px;
}

.live-map-inspector {
    display: grid;
    gap: 8px;
    min-height: 110px;
    padding: 12px;
    border: 1px solid rgba(220, 205, 144, 0.18);
    background: rgba(15, 14, 9, 0.68);
    color: var(--muted, #c9c0a2);
    font-size: 0.88rem;
}

.live-map-inspector strong {
    color: var(--text, #f2e8c4);
    font-size: 1rem;
}

.live-map-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding-right: 4px;
}

.live-map-list-item {
    width: 100%;
    border: 1px solid rgba(220, 205, 144, 0.18);
    background: rgba(15, 14, 9, 0.72);
    color: var(--text, #f2e8c4);
    text-align: left;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.live-map-list-item:hover,
.live-map-list-item:focus-visible {
    border-color: rgba(114, 210, 255, 0.70);
    outline: none;
}

@media (max-width: 1080px) {
    .live-map-layout {
        grid-template-columns: 1fr;
    }

    .live-map-stage {
        grid-template-rows: auto minmax(420px, 58vh) auto;
    }
}

@media (max-width: 860px) {
    .live-map-toolbar,
    .live-map-summary {
        grid-template-columns: 1fr;
    }

    .live-map-stage-head,
    .sidebar-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-map-status {
        justify-content: flex-start;
    }

    .live-map-stage {
        grid-template-rows: auto minmax(360px, 52vh) auto;
    }
}
