.movement-map-panel {
    padding: 18px;
    color: #d8d2c3;
}

.movement-playback {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    width: min(100%, 900px);
    margin-bottom: 12px;
}

.movement-playback-button {
    width: 36px;
    height: 32px;
    border: 1px solid rgba(176, 137, 84, 0.75);
    background: rgba(176, 137, 84, 0.16);
    color: #f0eadc;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.movement-playback-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.movement-playback-button:hover:not(:disabled) {
    background: rgba(176, 137, 84, 0.28);
}

.movement-playback-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.movement-playback-range {
    width: 100%;
    accent-color: #b08954;
}

.movement-playback-range:disabled {
    opacity: 0.45;
}

.movement-playback-speed {
    height: 32px;
    border: 1px solid rgba(120, 111, 91, 0.65);
    background: #15130f;
    color: #d8d2c3;
    font-size: 12px;
}

.movement-playback-time {
    color: #cfc7b5;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.movement-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 900px) minmax(220px, 280px);
    gap: 16px;
    align-items: start;
}

.movement-map-stage {
    position: relative;
    width: 100%;
    min-height: 320px;
    background: #0d0c09;
    border: 1px solid rgba(120, 111, 91, 0.45);
    overflow: hidden;
}

.movement-map-image {
    display: block;
    width: 100%;
    height: auto;
}

.movement-map-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.movement-track {
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.movement-track.is-highlighted,
.movement-track.is-hover-highlighted {
    stroke-width: 4;
}

.movement-track--ally {
    stroke: rgba(40, 200, 90, 0.75);
}

.movement-track--enemy {
    stroke: rgba(220, 60, 50, 0.75);
}

.movement-track--unknown {
    stroke: rgba(225, 210, 150, 0.65);
}

.movement-track-marker {
    pointer-events: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.movement-track-marker.is-highlighted,
.movement-track-marker.is-hover-highlighted {
    filter: drop-shadow(0 0 4px rgba(240, 234, 220, 0.9)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.movement-death-marker {
    pointer-events: auto;
    stroke: rgba(10, 10, 10, 0.9);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.movement-death-marker--ally {
    fill: rgba(40, 200, 90, 0.95);
}

.movement-death-marker--enemy {
    fill: rgba(220, 60, 50, 0.95);
}

.movement-death-marker--unknown {
    fill: rgba(225, 210, 150, 0.85);
}

.movement-death-marker.is-hover-highlighted {
    stroke: rgba(240, 234, 220, 0.95);
    stroke-width: 3;
}

.movement-map-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c7bfae;
    background: rgba(13, 12, 9, 0.82);
    font-size: 14px;
}

.movement-map-status[hidden] {
    display: none;
}

.movement-fast-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 260px;
    padding: 6px 8px;
    border: 1px solid rgba(176, 137, 84, 0.65);
    background: rgba(13, 12, 9, 0.94);
    color: #f0eadc;
    font-size: 12px;
    line-height: 1.35;
    pointer-events: none;
    white-space: pre-line;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.movement-fast-tooltip[hidden] {
    display: none;
}

.movement-legend {
    min-height: 320px;
    border: 1px solid rgba(120, 111, 91, 0.45);
    background: rgba(13, 12, 9, 0.72);
}

.movement-legend-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(120, 111, 91, 0.35);
    color: #f0eadc;
    font-size: 14px;
    font-weight: 700;
}

.movement-legend-toggle-all {
    border: 1px solid rgba(176, 137, 84, 0.55);
    background: rgba(176, 137, 84, 0.12);
    color: #d8d2c3;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    padding: 5px 7px;
}

.movement-legend-toggle-all:hover:not(:disabled) {
    background: rgba(176, 137, 84, 0.24);
}

.movement-legend-toggle-all:disabled {
    cursor: default;
    opacity: 0.5;
}

.movement-legend-list {
    max-height: 580px;
    overflow: auto;
    padding: 6px;
}

.movement-legend-item {
    display: grid;
    grid-template-columns: 16px 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 5px 6px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #d8d2c3;
    cursor: pointer;
    text-align: left;
}

.movement-legend-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.movement-legend-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.movement-legend-toggle {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #b08954;
    cursor: pointer;
}

.movement-legend-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.movement-legend-name,
.movement-legend-vehicle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movement-legend-name {
    color: #f0eadc;
    font-size: 12px;
    font-weight: 700;
}

.movement-legend-vehicle {
    color: #8f887a;
    font-size: 11px;
}

.movement-legend-empty {
    padding: 12px;
    color: #8f887a;
    font-size: 12px;
}

@media (max-width: 640px) {
    .movement-playback {
        grid-template-columns: auto 1fr auto;
    }

    .movement-playback-time {
        grid-column: 1 / -1;
    }

    .movement-map-layout {
        grid-template-columns: 1fr;
    }

    .movement-legend {
        min-height: 0;
    }
}

